/* Fonts self-hosted via src/styles/global.css — no external requests */

:root {
  --primary-bg: #0e1a14;
  --secondary-bg: #132010;
  --card-bg: #1b2e1a;
  --footer-bg: #070f07;
  --text-main: #e8f0e0;
  --text-muted: #8aaa80;
  --accent: #c8f000;
  --white: #ffffff;
  --safety: #ff6b00;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  --transition: 200ms ease;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Global type (in @layer base so Tailwind utilities override) ── */
@layer base {
  h1, h2, h3, .logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
  }

  h1 {
    font-size: 3.5rem;
    letter-spacing: 1px;
  }

  h2, h3 {
    text-transform: capitalize;
    margin-bottom: 1.5rem;
  }

  a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
  }

  a:hover {
    text-decoration: underline;
  }
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-bg);
  border-bottom: 2px solid var(--accent);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  text-decoration: none !important;
}

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

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
}

nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(14, 26, 20, 0.3) 0%, rgba(14, 26, 20, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 5%;
}

.card {
  background-color: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  /* removed opacity:0 + translateY animation — caused CLS */
}

.card:hover {
  transform: translateY(-5px);
  border-left: 3px solid var(--accent);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: var(--primary-bg);
  padding: 0.2rem 0.8rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 2px;
  text-transform: uppercase;
}

/* Boxes/Encadrés */
.box {
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid transparent;
}

.box-mechanic {
  background-color: #0a1f0a;
  border-left-color: var(--accent);
}

.box-safety {
  background-color: #1f0e0a;
  border-left-color: var(--safety);
}

.box-stat {
  background-color: var(--primary-bg);
  border-left-color: var(--accent);
  font-weight: bold;
}

.box-expert {
  background-color: #162214;
  border-left-color: var(--text-muted);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

thead {
  background-color: var(--card-bg);
}

th {
  font-family: 'Barlow Condensed', sans-serif;
  padding: 1rem;
  text-align: left;
  color: var(--white);
  text-transform: uppercase;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #253d23;
  color: var(--text-main);
}

/* Sections */
section:nth-of-type(even) {
  background-color: var(--secondary-bg);
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  padding: 4rem 5% 2rem;
  text-align: center;
}

footer .logo {
  display: block;
  margin-bottom: 2rem;
}

footer nav ul {
  justify-content: center;
  margin-bottom: 2rem;
}

.legal {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid #253d23;
  padding-top: 2rem;
}

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

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  nav {
    display: none; /* Mobile hamburger logic would go here */
  }
  
  h1 {
    font-size: 2.5rem;
  }
}

/* === HARDEN === */
/* Text overflow */
p, li, td, th, span, a, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Tables */
table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
@media (min-width: 640px) { table { display: table; } }
/* Forms */
input, select, textarea, button {
  color: var(--text-main, #e8f0e0);
  background-color: var(--card-bg, #1b2e1a);
  border: 1px solid #253d23;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 4px;
  max-width: 100%;
}
select option { background-color: #1b2e1a; color: #e8f0e0; }
input::placeholder, textarea::placeholder { color: var(--text-muted, #8aaa80); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent, #c8f000);
  outline-offset: 2px;
}
/* Image fallbacks */
img { max-width: 100%; height: auto; display: block; }
img[src=""], img:not([src]) { background: #1b2e1a; min-height: 200px; }
/* Safe area (iOS notch) */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }

/* === ARTICLE UTILITY CLASSES (restored-article compat) === */
/* These classes were used in the 38 restored original articles */
.text-secondary { color: #c8f000; }
.bg-secondary { background-color: #c8f000; }
.border-secondary { border-color: #c8f000; }
.bg-primary { background-color: #0e1a14; }
.text-primary { color: #0e1a14; }
.card-bg { background-color: #1b2e1a; }
.bg-cardBg { background-color: #1b2e1a; }
.cardBg { background-color: #1b2e1a; }
.text-accentBlue { color: #00b4d8; }
.border-accentBlue { border-color: #00b4d8; }
.bg-accentBlue { background-color: #00b4d8; }
.text-accentOrange { color: #ff6b00; }
.border-accentOrange { border-color: #ff6b00; }
.bg-accentOrange { background-color: rgba(255, 107, 0, 0.15); }
.accent-border { border-color: #c8f000; }
/* Print */
@media print {
  nav, #nav-header, #nav-mobile-menu, footer, .hero-dark-overlay { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  a { color: black; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 10pt; }
  img { max-width: 100%; page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; color: black; }
}

/* === POLISH === */
/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0e1a14; }
::-webkit-scrollbar-thumb { background: #253d23; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c8f000; }
/* Custom easing */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}
/* Card hover */
.card, [class*="card"] {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo), border-color 0.3s ease;
}
.card:hover, [class*="card"]:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(200, 240, 0, 0.12);
}
/* Max-width layout */
body > nav, body > main, body > footer,
body > div > nav, body > div > main, body > div > footer {
  max-width: 96rem;
  margin-left: auto;
  margin-right: auto;
}
/* Tinted neutrals */
:root {
  --bg-bg: #0e1a14;
  --bg-card: #1b2e1a;
  --text-dim: #8aaa80;
}

/* === BREADCRUMB COMPACT === */
.breadcrumb, nav[aria-label="fil d'ariane"], nav[aria-label="breadcrumb"] {
  font-size: 11px;
  letter-spacing: 0.05em;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}


/* ── Mini-tools : contraste inputs dark theme ─────────────────────── */
select,
input[type="number"],
input[type="text"],
input[type="email"] {
  color: var(--text-main);
  background-color: var(--primary-bg);
}

select option {
  color: var(--text-main);
  background-color: var(--card-bg);
}
