/* Motorsport Power — refonte 2026 */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #101113;
  --color-text-muted: #666b74;
  --color-border: #e6e8eb;

  --color-m-blue: #1c69d4;
  --color-m-purple: #6a1b9a;
  --color-m-red: #d5001c;

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1160px;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(16, 17, 19, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b0c0e;
    --color-bg-alt: #16181b;
    --color-surface: #17191c;
    --color-text: #f2f3f5;
    --color-text-muted: #9a9fa8;
    --color-border: #2a2d31;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.m-stripe {
  display: inline-flex;
  height: 4px;
  width: 44px;
  border-radius: 2px;
  overflow: hidden;
}
.m-stripe span {
  flex: 1;
}
.m-stripe span:nth-child(1) { background: var(--color-m-blue); }
.m-stripe span:nth-child(2) { background: var(--color-m-purple); }
.m-stripe span:nth-child(3) { background: var(--color-m-red); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-word i,
.logo-word b,
.logo-word em {
  font-style: normal;
  font-weight: inherit;
}

.logo-word i { color: var(--color-m-blue); }
.logo-word b { color: var(--color-m-purple); }
.logo-word em { color: var(--color-m-red); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.main-nav a.external::after {
  content: "↗";
  margin-left: 4px;
  font-size: 0.75em;
  opacity: 0.6;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--color-text);
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 32px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    overflow-y: auto;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    padding: 14px 10px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .nav-toggle {
    display: inline-block;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--color-border);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn-primary:hover {
  box-shadow: var(--shadow);
}
.btn-outline {
  border-color: var(--color-border);
  color: var(--color-text);
}

/* ---------- Sections & cards ---------- */

section {
  padding: 56px 0;
}

section.alt {
  background: var(--color-bg-alt);
}

h2.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.section-intro {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(16, 17, 19, 0.06), 0 1px 0 rgba(16, 17, 19, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card .card-media {
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card .card-body {
  padding: 14px 16px 18px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
}

.link-card {
  padding: 22px;
}
.link-card .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-m-blue);
  margin-bottom: 8px;
  display: block;
}
.link-card h3 {
  margin: 0 0 6px;
}
.link-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ---------- Article / fiche layout ---------- */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 18px 0 0;
}
.breadcrumb a {
  text-decoration: none;
  color: var(--color-text-muted);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.article-header {
  padding: 20px 0 32px;
}
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 10px 0 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 0 36px;
}
.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 40px;
  align-items: start;
}

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

.gallery--stack {
  grid-template-columns: 1fr;
}

.article-body p {
  font-size: 1.05rem;
  margin: 0 0 20px;
}
.article-body p:first-of-type {
  font-size: 1.2rem;
  color: var(--color-text);
  font-weight: 500;
}

.no-content-note {
  color: var(--color-text-muted);
  font-style: italic;
  padding: 8px 0 28px;
}

.specs {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: sticky;
  top: 96px;
}
.specs h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 14px;
}
.specs-section + .specs-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}
.specs-section h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-m-blue);
  margin: 0 0 10px;
}
.specs-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.specs-row:last-child {
  border-bottom: none;
}
.specs-row dt {
  color: var(--color-text-muted);
}
.specs-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ---------- Partenaires / contacts ---------- */

.partner-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  white-space: pre-line;
}
.partner-card h3 {
  margin: 0 0 8px;
}

.contact-box {
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(16, 17, 19, 0.06), 0 1px 0 rgba(16, 17, 19, 0.04);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.contact-box .btn {
  margin-top: 20px;
}

/* ---------- Search ---------- */

.search-box {
  margin-bottom: 32px;
}
.search-box input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}
.search-empty {
  display: none;
  color: var(--color-text-muted);
  padding: 24px 0;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 40px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--color-text);
}
.footer-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
}
