
/*
============================================================
 BASE.CSS — Fichier de base du projet Abyss Life Support
------------------------------------------------------------
Rôle :
  - Définit toutes les variables CSS globales (design tokens)
  - Fournit le reset navigateur, la typographie, les couleurs, les espacements
  - Contient les utilitaires globaux (textes, alignements, accessibilité)

Ce fichier doit contenir :
  - Les variables : couleurs, typographie, espacements, breakpoints, etc.
  - Les resets et styles de base HTML (body, h1-h6, p, a, ul, etc.)
  - Les utilitaires globaux (text-center, text-muted, visually-hidden, etc.)

Ce fichier ne doit PAS contenir :
  - Aucun style de composant (boutons, alertes, badges, cards, etc.)
  - Aucun style de layout (navbar, sidebar, footer, grid, flex, etc.)
  - Aucun style spécifique à une page ou un module

Utilisation :
  - Toujours inclus en premier dans base.html
  - Les autres CSS héritent de ses variables et resets
============================================================
*/
/* ========================================
   BASE.CSS - Abyss Life Support
   Variables, Reset, Typography
   ======================================== */

/* ========================================
   CSS VARIABLES - DESIGN TOKENS
   ======================================== */
:root {
  /* Couleurs - Palette Abysses */
  --bg-primary: #0A0F1A;
  --bg-secondary: #111826;
  --bg-card: #1A2332;
  --bg-hover: #222D3F;
  
  /* Textes */
  --text-primary: #F5F7FA;
  --text-secondary: #D0D5DD;
  --text-muted: #8B92A3;
  
  /* Accents */
  --accent-green: #1ED760;
  --accent-green-hover: #19C654;
  --accent-green-pressed: #15B049;
  --danger: #FF5C5C;
  --danger-hover: #FF3B3B;
  --warning: #F6C344;
  --warning-hover: #F5B524;
  --success: #1ED760;
  --info: #3B82F6;
  
  /* Bordures */
  --border-color: #2A3441;
  --border-color-light: #3A4556;
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;
  
  /* Ombres */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  
  /* Espacement */
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */
  --spacing-3xl: 4rem;     /* 64px */
  
  /* Typographie */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Layout */
  --nav-height: 110px;
  --sidebar-width: 260px;
  --footer-height: auto;
  --content-max-width: 1280px;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  
  /* Breakpoints (reference - used in media queries) */
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1280px;
}


/* ========================================
   FONTS - INTER SELF-HOSTED
   ======================================== */

/*
  INTER FONTS INSTALLATION:
  
  1. Download Inter from https://rsms.me/inter/
  2. Extract .woff2 and .woff files to static/fonts/
  3. Required files:
     - Inter-Regular.woff2 / .woff
     - Inter-Medium.woff2 / .woff
     - Inter-SemiBold.woff2 / .woff
     - Inter-Bold.woff2 / .woff
*/

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
}


/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Accessibility - Skip to content */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent-green);
  color: var(--bg-primary);
  padding: var(--spacing-md);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
}


/* ========================================
   TYPOGRAPHIE
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-green-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

strong, b {
  font-weight: var(--font-weight-bold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

code {
  font-family: 'Courier New', monospace;
  background-color: var(--bg-card);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm);
  color: var(--accent-green);
}

pre {
  background-color: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

pre code {
  background: none;
  padding: 0;
}


/* ========================================
   LISTES
   ======================================== */

ul, ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

ul.unstyled,
ol.unstyled {
  list-style: none;
  margin-left: 0;
}


/* ========================================
   IMAGES & MEDIA
   ======================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  max-width: 100%;
  fill: currentColor;
}


/* ========================================
   UTILITAIRES GLOBAUX
   ======================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}


/* ========================================
   SELECTION
   ======================================== */

::selection {
  background-color: var(--accent-green);
  color: var(--bg-primary);
}

::-moz-selection {
  background-color: var(--accent-green);
  color: var(--bg-primary);
}
