/* ==========================================================================
   BASE CSS & RESET — OBSIDIAN MINIMALIST & MONOLITH (SEP-UNSA 2027)
   ========================================================================== */

/* 1. Reset Moderne & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--dark-navy);
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-secondary);
  background-color: var(--dark-navy);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Auras Lumineuses Soyeuses d'Arrière-Plan (Mesh Gradients Passifs GPU) */
body::before {
  content: "";
  position: fixed;
  top: -10vw;
  left: -10vw;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(7, 9, 14, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

body::after {
  content: "";
  position: fixed;
  top: 5vh;
  right: -10vw;
  width: 45vw;
  height: 45vw;
  max-width: 650px;
  max-height: 650px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.10) 0%, rgba(7, 9, 14, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* 2. Accessibilité & Liens d'évitement (Skip Links) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--c1);
  color: #FFFFFF;
  padding: 0.65rem 1.25rem;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  z-index: 10000;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: top var(--tr-fast);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

/* 3. Typographie Globale d'Avant-Garde */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.015em;
}

h1 { font-size: var(--font-size-4xl); color: var(--text-primary); }
h2 { font-size: var(--font-size-3xl); color: var(--text-primary); }
h3 { font-size: var(--font-size-2xl); color: var(--text-primary); }
h4 { font-size: var(--font-size-xl); color: var(--text-primary); }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr-fast), opacity var(--tr-fast);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* 4. Conteneurs & Mise en Page */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  position: relative;
  z-index: 1;
}

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1;
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }
}

.section-header,
.section-header-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-8) auto;
}

/* Chips / Tags d'Accentuation */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.95rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  backdrop-filter: blur(12px);
}

.section-tag.tag-c1 { background: rgba(37, 99, 235, 0.12); color: #60A5FA; border: 1px solid rgba(37, 99, 235, 0.25); }
.section-tag.tag-c2 { background: rgba(225, 29, 72, 0.12); color: #FB7185; border: 1px solid rgba(225, 29, 72, 0.25); }
.section-tag.tag-c3 { background: rgba(16, 185, 129, 0.12); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.25); }

.section-title {
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.section-subtitle,
.section-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: var(--line-height-relaxed);
}

/* 5. Boutons Haute Couture */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  transition: transform var(--tr-fast), background-color var(--tr-fast), border-color var(--tr-fast), box-shadow var(--tr-fast);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Boutons primaires tonals & pleins */
.btn-primary-cyan {
  background: var(--c1);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary-cyan:hover {
  background: #3B82F6;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  color: #FFFFFF;
}

.btn-alert-rose {
  background: var(--c2);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-alert-rose:hover {
  background: #F43F5E;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5);
  color: #FFFFFF;
}

.btn-success-green {
  background: var(--c3);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success-green:hover {
  background: #059669;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  color: #FFFFFF;
}

/* Boutons secondaires outlined / ghost */
.btn-secondary-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(12px);
}

.btn-secondary-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

/* 6. Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
}

.badge-live {
  background: var(--c2);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.4);
}

/* 7. Utilitaires & Helpers */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 8. Impression (@media print) */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  body::before, body::after {
    display: none !important;
  }
  .app-header, .ticker-wrap, .btn, .skip-link, .app-footer, .search-modal {
    display: none !important;
  }
  .section {
    padding: 1rem 0 !important;
    page-break-inside: avoid;
    border: none !important;
  }
}
