/* ============================================
   EXCEL PERFECTIONNEMENT - Stylesheet Centralisé
   Charte Graphique Finale
   ============================================ */

:root {
  /* Gradients par module */
  --gradient-mod-0: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-mod-1: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-mod-2: linear-gradient(135deg, #f5af19 0%, #ec008c 100%);
  --gradient-mod-3: linear-gradient(135deg, #ec008c 0%, #9400d3 100%);
  --gradient-mod-4: linear-gradient(135deg, #f39c12 0%, #f67e22 100%);
  --gradient-mod-5: linear-gradient(135deg, #00d2fc 0%, #0066ff 100%);
  --gradient-mod-6: linear-gradient(135deg, #e74c3c 0%, #8b4513 100%);
  --gradient-mod-7: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);

  /* Couleurs */
  --text-dark: #2c3e50;
  --text-light: #ecf0f1;
  --bg-light: #f8f9fa;
  --bg-dark: #1a2332;
  --border-color: #bdc3c7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* ============================================
   HEADER (tous les modules)
   ============================================ */

.header {
  padding: 40px 20px;
  color: white;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.header .subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 20px;
}

.header .meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  opacity: 0.9;
}

.header .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   BOUTON ACCUEIL (fixe top-right)
   ============================================ */

.btn-home {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  padding: 10px 20px;
  background: white;
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   NAVIGATION (onglets sticky)
   ============================================ */

.nav-wrapper {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 2px solid var(--border-color);
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
}

.nav-btn {
  padding: 8px 16px;
  border: none;
  background: var(--bg-light);
  color: var(--text-dark);
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.nav-btn.active {
  color: white;
  background: var(--text-dark);
  font-weight: 600;
}

/* ============================================
   BLOCS DE CONTENU
   ============================================ */

.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.bloc {
  display: none;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.bloc.active {
  display: block;
  opacity: 1;
}

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

.bloc-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.bloc-header h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.bloc-header .bloc-duration {
  font-size: 0.95rem;
  color: #7f8c8d;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   SECTIONS ET CONTENU
   ============================================ */

.section {
  margin-bottom: 30px;
}

.section h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  margin-top: 25px;
  color: var(--text-dark);
  border-left: 4px solid #3498db;
  padding-left: 12px;
}

.section p {
  margin-bottom: 12px;
  line-height: 1.7;
}

.section ul, .section ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.section li {
  margin-bottom: 8px;
}

/* ============================================
   CALLOUTS (Info, Warning, Success, Danger)
   ============================================ */

.callout {
  padding: 16px;
  margin: 20px 0;
  border-left: 4px solid;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.callout.info {
  border-color: #3498db;
  background-color: #e3f2fd;
  color: #1565c0;
}

.callout.warning {
  border-color: #f39c12;
  background-color: #fff3e0;
  color: #e65100;
}

.callout.success {
  border-color: #27ae60;
  background-color: #e8f5e9;
  color: #1b5e20;
}

.callout.danger {
  border-color: #e74c3c;
  background-color: #ffebee;
  color: #b71c1c;
}

.callout strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* ============================================
   TABLES
   ============================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

thead {
  background: var(--text-dark);
  color: white;
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background-color: var(--bg-light);
}

/* ============================================
   CODE BLOCKS
   ============================================ */

code {
  background-color: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
}

pre {
  background-color: #1e2d3d;
  color: #ecf0f1;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Courier New', monospace;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ============================================
   EXERCICES & CHECKLISTS
   ============================================ */

.exercice {
  background: #f0f8ff;
  border: 2px dashed #3498db;
  padding: 16px;
  border-radius: 6px;
  margin: 20px 0;
}

.exercice h4 {
  color: #2980b9;
  margin-bottom: 10px;
  font-weight: 600;
}

.checklist {
  list-style: none;
  margin: 20px 0;
}

.checklist li {
  padding: 8px 0;
  padding-left: 30px;
  position: relative;
}

.checklist li:before {
  content: '☑';
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: bold;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
  font-size: 0.95rem;
}

footer p {
  margin-bottom: 8px;
}

footer a {
  color: #3498db;
  text-decoration: none;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .header .meta {
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    gap: 6px;
    padding: 10px 10px;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .btn-home {
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .content {
    padding: 15px;
  }

  .bloc-header h2 {
    font-size: 1.5rem;
  }

  .section h3 {
    font-size: 1.1rem;
  }

  table {
    font-size: 0.9rem;
  }

  th, td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .nav {
    gap: 4px;
    padding: 8px 5px;
  }

  .nav-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}
