/**
 * Styles spécifiques pour la page d'accueil (index.html)
 * Le Monde des Curieux
 */

/* Styles pour le titre principal */
header h1 {
    font-family: 'Minecraftia', sans-serif;
    color: #2e7d32;
    margin: 15px 0;
    text-align: center;
  }
  
  /* Réinitialisation des listes */
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  /* ====== MENU LATÉRAL ====== */
  
  /* Menu latéral */
  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #f5f5f5;
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 50px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    overflow-y: auto;
  }
  
  /* État ouvert du menu */
  .sidebar.open {
    left: 0;
  }
  
  .sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .sidebar li {
    margin: 0;
    padding: 0;
  }
  
  /* Liens du menu */
  .sidebar a {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.2s;
  }
  
  .sidebar a:hover {
    background-color: #e0e0e0;
  }
  
  /* Bouton hamburger stylisé */
  .sidebar-toggle {
    position: fixed;
    left: 10px;
    top: 10px;
    padding: 12px 16px;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, #ffb347 0%, #ff7746 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 1200;
  }
  
  .sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .4);
  }
  
  .sidebar-toggle:active {
    transform: scale(.95);
  }
  
  /* Styles pour l'élément actif du menu */
  .sidebar a.active {
    background-color: #1b5e20;
    color: white;
    font-weight: bold;
  }
  
  /* Mode sombre pour le menu */
  body.dark-mode .sidebar {
    background-color: #252525;
  }
  
  body.dark-mode .sidebar a {
    color: #e0e0e0;
    border-bottom-color: #444;
  }
  
  body.dark-mode .sidebar a:hover {
    background-color: #333;
  }
  
  body.dark-mode .sidebar a.active {
    background-color: #2e7d32;
  }
  
  /* Contraste élevé pour le menu */
  body.high-contrast .sidebar {
    background-color: #000;
    border-right: 2px solid #fff;
  }
  
  body.high-contrast .sidebar a {
    color: #fff;
    border-bottom-color: #fff;
  }
  
  body.high-contrast .sidebar a:hover,
  body.high-contrast .sidebar a.active {
    background-color: #fff;
    color: #000;
  }
  
  /* ====== MISE EN PAGE PRINCIPALE ====== */
  
  /* Mise en page à deux colonnes */
  .main-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 20px auto;
    align-items: flex-start;
  }
  
  .mindmap-section {
    flex: 1 1 60%;
    min-width: 300px;
  }
  
  .parcours-section {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, .8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
    position: relative;
  }
  
  /* Cartes de parcours */
  .parcours-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
    transition: transform .2s;
  }
  
  .parcours-card:hover {
    transform: translateY(-4px);
  }
  
  .parcours-title {
    font-family: 'Minecraftia', sans-serif;
    color: #2e7d32;
    font-size: 18px;
    margin-bottom: 8px;
    text-align: center;
  }
  
  .parcours-button {
    display: inline-block;
    margin-top: 10px;
    background: #4caf50;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
  }
  
  /* ====== LOADER ET ANIMATIONS ====== */
  
  /* Loader */
  #loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    z-index: 9999;
  }
  
  .spinner {
    width: 64px;
    height: 64px;
    border: 6px solid #ccc;
    border-top-color: #2a9d8f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg)
    }
  }
  
  /* ====== ACCESSIBILITÉ ====== */
  
  /* Styles pour les boutons d'accessibilité sur la page d'accueil */
  .accessibility-tools {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 1200;
  }
  
  .accessibility-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4caf50;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  .accessibility-button:hover {
    background: #2e7d32;
    transform: scale(1.1);
  }
  
  /* Styles pour le texte agrandi */
  body.large-text .sidebar a {
    font-size: 1.2em;
    padding: 15px;
  }
  
  /* ====== RESPONSIVE ====== */
  
  /* Adaptation pour les écrans moyens */
  @media (max-width: 1024px) {
    .main-wrapper {
      flex-direction: column;
    }
    
    .parcours-section {
      flex: 1 1 auto;
      margin-top: 20px;
    }
  }
  
  /* Adaptation pour les petits écrans */
  @media (max-width: 768px) {
    /* Menu plus petit sur mobile */
    .sidebar {
      width: 200px;
      left: -200px;
    }
    
    .sidebar a {
      padding: 10px;
    }
    
    .accessibility-tools {
      top: 70px; /* Évite le chevauchement avec le bouton du menu */
    }
  }