/* ============================================
   micro.fr — Style Global
   Design : Studio d'enregistrement, sombre & immersif
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #1A1A2E;
  --bg-card: #16213E;
  --bg-card-hover: #1a2847;
  --accent-blue: #0F3460;
  --accent-violet: #533483;
  --text-primary: #E8E8E8;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --cta: #4CC9F0;
  --cta-hover: #3AB8DF;
  --cta-glow: rgba(76, 201, 240, 0.25);
  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #F87171;
  --gold: #F59E0B;
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
  --max-width: 1200px;
  --max-width-article: 860px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cta); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--cta-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }

/* === CONTAINER === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container--article { max-width: var(--max-width-article); }

/* === HEADER / NAV === */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  color: #fff;
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo span { color: var(--cta); }

.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-primary); font-size: 1.5rem; padding: 0.5rem;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    padding: 1rem; gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; width: 100%; }
}

/* === HERO === */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-blue) 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(76, 201, 240, 0.08) 0%, transparent 70%);
}
.hero h1 { margin-bottom: 1rem; position: relative; }
.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 2rem;
  position: relative;
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--cta); color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--cta-hover); color: var(--bg-primary);
  box-shadow: 0 0 20px var(--cta-glow);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--cta);
  border: 1.5px solid var(--cta);
}
.btn-outline:hover {
  background: rgba(76, 201, 240, 0.1);
  box-shadow: 0 0 15px var(--cta-glow);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* === PRODUCT CARD === */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all var(--transition);
}
.product-card:hover { border-color: var(--border-light); box-shadow: var(--shadow); }

.product-card__header {
  display: flex; align-items: flex-start; gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.product-card__img {
  width: 140px; height: 140px;
  background: var(--accent-blue);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; flex-shrink: 0;
}
.product-card__info { flex: 1; }
.product-card__name { font-size: 1.4rem; margin-bottom: 0.25rem; }
.product-card__brand { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.product-card__price {
  font-size: 1.3rem; font-weight: 700; color: var(--cta);
}
.product-card__badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge--type { background: rgba(83, 52, 131, 0.3); color: #B794F4; }
.badge--connect { background: rgba(15, 52, 96, 0.4); color: var(--cta); }
.badge--top { background: rgba(245, 158, 11, 0.2); color: var(--gold); }

.product-card__rating {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 1rem 0;
}
.rating-bar {
  flex: 1; height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px; overflow: hidden;
}
.rating-bar__fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--cta), var(--accent-violet));
}
.rating-score { font-weight: 700; font-size: 1.1rem; color: var(--cta); min-width: 40px; }

.product-card__desc { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8; }

.product-card__pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .product-card__pros-cons { grid-template-columns: 1fr; } }

.pros li::before { content: '✓ '; color: var(--success); font-weight: 700; }
.cons li::before { content: '✗ '; color: var(--danger); font-weight: 700; }
.pros, .cons { list-style: none; }
.pros li, .cons li { padding: 0.3rem 0; font-size: 0.92rem; color: var(--text-secondary); }

.product-card__verdict {
  background: rgba(76, 201, 240, 0.06);
  border-left: 3px solid var(--cta);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
}
.product-card__verdict strong { color: var(--cta); }

.product-card__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* === COMPARISON TABLE === */
.table-wrapper {
  overflow-x: auto; margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}
.comparison-table th {
  background: var(--accent-blue);
  color: #fff; font-weight: 600;
  padding: 0.85rem 1rem;
  text-align: left; white-space: nowrap;
  position: sticky; top: 0;
}
.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.comparison-table tr:hover td { background: rgba(255,255,255,0.02); }
.comparison-table .highlight { color: var(--cta); font-weight: 600; }

/* === TOP 3 SUMMARY === */
.top3 {
  background: linear-gradient(135deg, rgba(15, 52, 96, 0.3), rgba(83, 52, 131, 0.2));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}
.top3 h3 { color: var(--gold); margin-bottom: 1rem; }
.top3__item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.top3__item:last-child { border-bottom: none; }
.top3__rank {
  width: 36px; height: 36px;
  background: var(--accent-violet);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.top3__rank--1 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.top3__rank--2 { background: linear-gradient(135deg, #94A3B8, #64748B); }
.top3__rank--3 { background: linear-gradient(135deg, #C2884A, #92653A); }
.top3__info { flex: 1; }
.top3__name { font-weight: 700; font-size: 1.05rem; }
.top3__detail { color: var(--text-secondary); font-size: 0.88rem; }
.top3__price { font-weight: 700; color: var(--cta); white-space: nowrap; }

/* === INFO BOX === */
.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.info-box--tip { border-left: 3px solid var(--cta); }
.info-box--warning { border-left: 3px solid var(--warning); }
.info-box--usage { border-left: 3px solid var(--accent-violet); }
.info-box h4 { margin-bottom: 0.5rem; font-size: 1rem; }
.info-box p { color: var(--text-secondary); font-size: 0.95rem; }

/* === CATEGORY GRID === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.category-card:hover {
  border-color: var(--cta);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(76, 201, 240, 0.1);
  color: #fff;
}
.category-card__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.category-card__title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.category-card__desc { font-size: 0.82rem; color: var(--text-muted); }

/* === USAGE BAR (Search by usage) === */
.usage-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  justify-content: center; margin: 2rem 0;
}
.usage-bar a {
  padding: 0.6rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
}
.usage-bar a:hover {
  background: var(--accent-blue);
  border-color: var(--cta);
  color: #fff;
}

/* === FEATURED PRODUCT === */
.featured {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex; align-items: center; gap: 2rem;
  margin: 3rem 0;
  position: relative; overflow: hidden;
}
.featured::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(76, 201, 240, 0.15), transparent);
  border-radius: 50%;
}
.featured__badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--gold); color: var(--bg-primary);
  padding: 0.3rem 0.8rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.featured__img {
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; flex-shrink: 0;
}
.featured__content { flex: 1; position: relative; z-index: 1; }
.featured__content h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.featured__content p { color: rgba(255,255,255,0.8); margin-bottom: 1rem; }
@media (max-width: 600px) {
  .featured { flex-direction: column; text-align: center; }
  .featured__img { width: 120px; height: 120px; font-size: 3rem; }
}

/* === BREADCRUMBS === */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--cta); }
.breadcrumbs span { margin: 0 0.4rem; }

/* === ARTICLE LAYOUT === */
.article-header {
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, rgba(15, 52, 96, 0.3) 0%, transparent 100%);
}
.article-header h1 { margin-bottom: 0.75rem; }
.article-meta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.88rem;
}
.article-meta span { display: flex; align-items: center; gap: 0.3rem; }

.article-body { padding: 2rem 0 4rem; }
.article-body h2 { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body p { margin-bottom: 1rem; color: var(--text-secondary); }
.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.5rem; color: var(--text-secondary); }
.article-body li { margin-bottom: 0.5rem; }

/* === TOC (Table of Contents) === */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.toc h4 { margin-bottom: 0.75rem; color: var(--cta); font-size: 0.95rem; }
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--text-secondary); font-size: 0.9rem; }
.toc a:hover { color: var(--cta); }

/* === SECTION === */
.section { padding: 4rem 0; }
.section--alt { background: rgba(15, 52, 96, 0.15); }
.section__title {
  text-align: center; margin-bottom: 0.5rem;
}
.section__subtitle {
  text-align: center; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 2.5rem;
  font-size: 1rem;
}

/* === FOOTER === */
.site-footer {
  background: rgba(10, 10, 20, 0.6);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.75rem; line-height: 1.6; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.footer-col a {
  display: block; color: var(--text-muted);
  font-size: 0.85rem; padding: 0.25rem 0;
}
.footer-col a:hover { color: var(--cta); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--cta); }

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.active { transform: translateY(0); }
.cookie-banner p { flex: 1; font-size: 0.88rem; color: var(--text-secondary); }
.cookie-banner a { color: var(--cta); }
.cookie-btns { display: flex; gap: 0.5rem; }

/* === SCHEMA DIAGRAM (USB vs XLR) === */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}
.diagram__row {
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin: 1rem 0;
}
.diagram__box {
  background: var(--accent-blue);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem; font-weight: 600;
}
.diagram__arrow { color: var(--cta); font-size: 1.5rem; }

/* === GRID LAYOUTS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600; font-size: 1.05rem;
  color: var(--text-primary);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--cta); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 0.75rem; color: var(--text-secondary); font-size: 0.95rem; }

/* === LEGAL PAGES === */
.legal-body h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.4rem; border-top: none; padding-top: 0; }
.legal-body h3 { margin-top: 1.5rem; }
.legal-body p, .legal-body li { color: var(--text-secondary); }

/* === UTILS === */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* === PRINT === */
@media print {
  .site-header, .site-footer, .cookie-banner { display: none; }
  body { background: #fff; color: #000; }
  .card, .product-card { border: 1px solid #ccc; box-shadow: none; }
}
