  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      direction: rtl;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
      line-height: 1.6;
    }
    
    .container {
      max-width: 1200px;
      margin: 0 auto;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 20px;
      padding: 40px;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(10px);
    }
    
    h1 {
      color: #2c3e50;
      text-align: center;
      margin-bottom: 40px;
      font-size: 2.5em;
      font-weight: 700;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
      background: linear-gradient(45deg, #3498db, #9b59b6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    
    h2 {
      color: #34495e;
      margin-bottom: 25px;
      font-size: 1.4em;
      padding: 15px 20px;
      background: linear-gradient(135deg, #74b9ff, #0984e3);
      color: white;
      border-radius: 12px;
      box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
      text-align: right;
    }
    
    .exercice {
      margin-bottom: 40px;
      background: white;
      padding: 30px;
      border-radius: 15px;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(116, 185, 255, 0.2);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .exercice:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }
    
    .problem-item {
      margin-bottom: 25px;
      padding: 20px;
      background: #f8faff;
      border-radius: 12px;
      border-right: 4px solid #74b9ff;
      transition: all 0.3s ease;
    }
    
    .problem-item:hover {
      background: #f1f5ff;
      transform: translateX(-5px);
    }
    
    .math-expression {
      display: inline-block;
      margin: 10px 0;
      padding: 8px 15px;
      background: linear-gradient(135deg, #e8f4f8, #d6eaf8);
      border-radius: 8px;
      border: 1px solid #74b9ff;
      font-size: 1.1em;
    }
    
    .correction {
      display: none;
      background: linear-gradient(135deg, #d1f2eb, #a3e4d7);
      padding: 20px;
      border-radius: 12px;
      margin-top: 15px;
      border-right: 4px solid #00b894;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .show-btn {
      background: linear-gradient(135deg, #74b9ff, #0984e3);
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 25px;
      cursor: pointer;
      margin-top: 10px;
      font-size: 0.9em;
      font-weight: 600;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
    }
    
    .show-btn:hover {
      background: linear-gradient(135deg, #0984e3, #74b9ff);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
    }
    
    .show-btn:active {
      transform: translateY(0);
    }
    
    .step-title {
      color: #2d3436;
      font-weight: bold;
      margin-bottom: 8px;
      padding: 5px 10px;
      background: rgba(116, 185, 255, 0.1);
      border-radius: 6px;
      display: inline-block;
    }
    
    .result {
      background: linear-gradient(135deg, #fd79a8, #e84393);
      color: white;
      padding: 8px 15px;
      border-radius: 8px;
      display: inline-block;
      margin-top: 10px;
      font-weight: bold;
    }
    
    ul {
      list-style: none;
      padding: 0;
    }
    
    li {
      margin-bottom: 0;
    }
    
    .math-step {
      background: #f8f9fa;
      padding: 8px 12px;
      margin: 5px 0;
      border-radius: 6px;
      border-right: 3px solid #74b9ff;
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
      .container {
        padding: 20px;
        margin: 10px;
      }
      
      h1 {
        font-size: 2em;
      }
      
      h2 {
        font-size: 1.2em;
        padding: 12px 15px;
      }
      
      .exercice {
        padding: 20px;
      }
      
      .problem-item {
        padding: 15px;
      }
    }
    
    /* Animation for corrections */
    .correction.show {
      animation: fadeInSlide 0.5s ease-out;
    }
    
    @keyframes fadeInSlide {
      from {
        opacity: 0;
        transform: translateY(-20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
	  /* === FIX: rendre visibles les éléments générés par erc.js === */
.erc{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.erc-enonce{
  flex: 1;
  text-align: right;
}

.erc-saisie{
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.math-answer{
  display: inline-block !important;
  width: 170px;
  padding: 10px 12px;
  border: 2px solid rgba(0,0,0,.25);
  border-radius: 10px;
  background: #ffffff;
  color: #111;
  font-size: 16px;
}

.ka-trigger{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.18);
  background: #f3f4f6;
  cursor: pointer;
}

.erc-valider{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,.18);
  background: #e5e7eb;
  cursor: pointer;
}
    }