/* /assets/css/design.css - Système de design global */

/* ========================================
   Variables et Reset
   ======================================== */
:root {
  /* Couleurs système */
  --primary: #1E88E5;
  --primary-dark: #1565C0;
  --primary-light: #E3F2FD;
  --secondary: #00ACC1;
  --success: #43A047;
  --warning: #FB8C00;
  --danger: #E53935;
  --info: #039BE5;

  /* Neutres */
  --dark: #263238;
  --gray-900: #37474F;
  --gray-700: #546E7A;
  --gray: #607D8B;
  --gray-400: #90A4AE;
  --gray-200: #CFD8DC;
  --light: #ECEFF1;
  --white: #FFFFFF;

  /* Thèmes silos */
  --theme-tva: #1E88E5;
  --theme-course: #2E7D32;
  --theme-moyennes: #6A1B9A;
  --theme-heures: #3949AB;
  --theme-metabolisme: #F4511E;
  --theme-rh: #00796B;
  --theme-surfaces: #00838F;
  --theme-volumes: #6D4C41;
  --theme-interets: #C62828;
  --theme-grossesse: #AD1457;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-md: 0 6px 10px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);

  /* Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Container */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container: 800px;
  --container-lg: 1024px;
  --container-xl: 1200px;
}

/* Reset moderne */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-system);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

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

a:hover {
  color: var(--primary-dark);
}

/* ========================================
   Layout Components
   ======================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

.container-lg {
  max-width: var(--container-lg);
}

.container-xl {
  max-width: var(--container-xl);
}


/* Header & Navigation (from Claude homepage structure) */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover { color: var(--primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }


/* Calculator pages (hero, sections, results) */
.main { padding: 2rem 0; }
.hero { padding: 3rem 0 2rem; }
.hero h1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .hero__subtitle { color: var(--gray); margin-top: .5rem; }
.hero .hero__description { color: var(--gray-700); max-width: 60ch; }

.calculator-section { padding: 1rem 0 3rem; }

/* Typography utilities used in pages created */
.text--xl { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; }
.text--sm { font-size: .9375rem; }
.text--secondary { color: var(--gray); }

/* Result card styles */
.result-card .result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--light);
}
.result-card .result-item:last-child { border-bottom: 0; }
.result-card .result-label { color: var(--gray); font-weight: 600; }
.result-card .result-value { font-weight: 700; }
.result-card .result-value--large { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
.result-card .result-item--primary {
  background: linear-gradient(135deg, var(--primary-light), #f5f9ff);
}

/* Forms spacing within cards */
.card .form-group { margin-bottom: 1rem; }

/* Simple container section spacing for index pages */
.calculators-grid { padding: 2rem 0; }

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); }

/* Card Component */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space);
  border-bottom: 1px solid var(--light);
}

.card-body {
  margin-bottom: var(--space);
}

.card-footer {
  margin-top: var(--space-md);
  padding-top: var(--space);
  border-top: 1px solid var(--light);
}

/* ========================================
   Forms & Inputs
   ======================================== */
.form-group {
  margin-bottom: var(--space-md);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--dark);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--light);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--light);
  color: var(--dark);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-200);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert {
  padding: var(--space);
  border-radius: var(--radius);
  margin-bottom: var(--space);
  border-left: 4px solid;
}

.alert-info {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.alert-success {
  background: #E8F5E9;
  border-color: var(--success);
  color: #1B5E20;
}

.alert-warning {
  background: #FFF3E0;
  border-color: var(--warning);
  color: #E65100;
}

.alert-danger {
  background: #FFEBEE;
  border-color: var(--danger);
  color: #B71C1C;
}

/* ========================================
   Tables
   ======================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space);
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--light);
}

.table th {
  font-weight: 600;
  background: var(--light);
  color: var(--dark);
}

.table-striped tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background: var(--light);
}

/* ========================================
   Badges & Tags
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--light);
  color: var(--gray);
}

.badge-primary { background: var(--primary); color: var(--white); }
.badge-success { background: var(--success); color: var(--white); }
.badge-warning { background: var(--warning); color: var(--white); }
.badge-danger { background: var(--danger); color: var(--white); }

/* ========================================
   Loading & Spinners
   ======================================== */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--light) 25%, var(--gray-200) 50%, var(--light) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray); }

.bg-primary { background: var(--primary); }
.bg-light { background: var(--light); }
.bg-white { background: var(--white); }

.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }

.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space); }
.gap-3 { gap: var(--space-md); }

/* ========================================
   Animations
   ======================================== */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .hide-mobile { display: none; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none; }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .no-print,
  nav,
  footer {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* ========================================
   Version Minifiée: /assets/css/design.min.css
   ======================================== */
/* Copier tout le contenu ci-dessus et le minifier avec un outil comme cssnano ou clean-css */