body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    font-size: 18px; /* Base font size augmentée */
    line-height: 1.6; /* Améliore l'espacement vertical entre les lignes */
}

body.tutorial-page {
    height: auto;
    overflow-y: auto;
}

/* Container du tutoriel */
.tutorial-container {
    max-width: 2000px; /* Taille optimisée pour la lecture */
    width: 90%;
    margin: 4rem auto 10rem;
    padding: 3rem; /* Plus grand padding pour plus d'espace entre le texte et la bordure */
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease-out;
}

/* Étapes individuelles */
.tutorial-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.tutorial-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tutorial-step .btn-next, .tutorial-step .btn-primary {
    position: sticky;
    bottom: 2rem;
    left: 100%;
    transform: translateX(-10%);
}

/* Amélioration des titres */
.tutorial-step h1 {
    font-size: 2.8rem; /* Plus grand */
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.tutorial-step h2 {
    font-size: 2.2rem; /* Plus grand */
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.tutorial-step h3 {
    font-size: 1.8rem; /* Plus grand */
    margin-top: 1.8rem;
    margin-bottom: 1rem;
}

.tutorial-step h4 {
    font-size: 1.5rem; /* Plus grand */
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Amélioration des paragraphes */
.tutorial-step p {
    font-size: 1.2rem; /* Plus grand */
    margin-bottom: 1.2rem;
    max-width: 96%; /* Évite que le texte aille jusqu'au bord */
}

/* Amélioration des listes */
.tutorial-step ul, 
.tutorial-step ol {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-left: 2rem; /* Plus d'espace avant les puces */
}

.tutorial-step li {
    margin-bottom: 0.8rem; /* Plus d'espace entre les items */
}

/* Progress bar */
.progress-bar {
    background-color: var(--light-gray);
    width: 100%;
    height: 10px;
    border-radius: 8px;
    margin-bottom: 3rem;
    overflow: hidden;
}

.progress {
    background-color: var(--primary-color);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}

/* Contenu caché */
.hidden-content {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.02);
}



/* Ajouter à tutorials.css */

/* Mise en forme des scénarios */
.scenario-box {
    background-color: var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.scenario-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.scenario-button {
    padding: 0.8rem 1.2rem;
    background-color: white;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#scenario-growth:hover {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
}

#scenario-recession:hover {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

#scenario-inflation:hover {
    background-color: rgba(243, 156, 18, 0.1);
    border-color: #f39c12;
}

.scenario-result {
    padding: 1.5rem;
    margin-top: 1.5rem;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid var(--medium-gray);
    animation: fadeIn 0.5s ease-out;
}

.scenario-result h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.scenario-result p {
    margin-bottom: 0.8rem;
}

/* Drag & Drop section */
.drag-drop {
    margin: 2.5rem 0;
}

.drag-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.draggable {
    background: var(--light-gray);
    padding: 1.2rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    cursor: grab;
    min-width: 120px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.drop-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
}

.drop-zone {
    background: var(--light-gray);
    border: 2px dashed var(--medium-gray);
    padding: 2.5rem;
    width: 30%;
    text-align: center;
    border-radius: 8px;
    min-height: 100px;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Slider de risque */
#risk-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    background: var(--light-gray);
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

#risk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

#risk-labels {
    display: flex;
    justify-content: space-between;
    margin: 0.8rem 0 1.2rem;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

#risk-labels span {
    font-weight: 500;
}

#risk-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to right, #10b981, #fbbf24, #ef4444); 
    z-index: 1;
    opacity: 0.7;
}

#risk-result {
    font-weight: 600;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

/* Visualisation risque-rendement améliorée */
.risk-reward-visualization {
    background-color: var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.risk-visual-container {
    position: relative;
    height: 100px; /* Plus grand pour mieux visualiser */
    overflow: hidden;
    border-radius: 8px;
}

#volatility-waves {
    position: relative;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
}

.wave {
    position: absolute;
    height: 40px;
    width: 100%;
    background-repeat: repeat-x;
    background-position: 0 center;
}

.investment-info {
    background-color: white;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 1.15rem;
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-row span:first-child {
    font-weight: 500;
    color: var(--dark-gray);
}

.info-row span:last-child {
    font-weight: 600;
}

#return-value, #volatility-value, #sharpe-value {
    transition: all 0.3s ease;
}

.current-example {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background-color: rgba(52, 152, 219, 0.1);
    padding: 1.2rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    font-size: 1.15rem;
}

#investment-example {
    font-weight: 500;
}

.risk-explanation {
    background-color: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
    transition: all 0.5s ease;
}

.risk-explanation h4 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.risk-explanation p {
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.7;
}

/* Quiz */
.quiz-option {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    background-color: white;
    text-align: left;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background-color: var(--light-gray);
}

.selected-correct {
    background-color: rgba(46, 204, 113, 0.15) !important;
    border-color: var(--success) !important;
}

.selected-incorrect {
    background-color: rgba(231, 76, 60, 0.15) !important;
    border-color: var(--danger) !important;
    text-decoration: line-through;
}

.highlight-correct {
    background-color: rgba(46, 204, 113, 0.15) !important;
    border-color: var(--success) !important;
    font-weight: bold;
}

.quiz-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.15rem;
    animation: fadeIn 0.5s ease-out;
}

.quiz-result.success {
    background-color: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.quiz-result.partial {
    background-color: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.quiz-next {
    margin-top: 10px;
}

/* Boutons généraux */
.btn-next, .btn-primary {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-next:hover, .btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Amélioration du bouton Voir des exemples */
.btn-reveal {
    padding: 0.9rem 1.5rem;
    background-color: var(--light-gray);
    color: var(--primary-color);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

.btn-reveal::after {
    content: "\f078"; /* icône flèche bas FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-reveal:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-reveal:hover::after {
    transform: translateY(2px);
}

.btn-reveal:active {
    transform: translateY(0);
}

/* Conteneur du slider */
.risk-slider-container {
    margin: 2.5rem 0;
}

/* Lien de retour */
.back-link {
    display: inline-block;
    margin: 2rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

/* Animation d'entrée */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animation de pulsation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); } /* Réduction légère pour éviter l'effet exagéré avec des éléments plus grands */
    100% { transform: scale(1); }
}

/* Allocation des actifs améliorée */
.allocation-container {
  background-color: var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.allocation-container label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-color);
}

.allocation-container input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 10px;
  margin-bottom: 0.5rem;
  border-radius: 5px;
}

.allocation-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Couleurs spécifiques pour chaque slider */
#actions-slider {
  background: linear-gradient(to right, #e0e0e0, #3498db);
}
#actions-slider::-webkit-slider-thumb {
  background: #3498db;
}

#real-estate-slider {
  background: linear-gradient(to right, #e0e0e0, #2ecc71);
}
#real-estate-slider::-webkit-slider-thumb {
  background: #2ecc71;
}

#bonds-slider {
  background: linear-gradient(to right, #e0e0e0, #f39c12);
}
#bonds-slider::-webkit-slider-thumb {
  background: #f39c12;
}

#cash-slider {
  background: linear-gradient(to right, #e0e0e0, #9b59b6);
}
#cash-slider::-webkit-slider-thumb {
  background: #9b59b6;
}

.allocation-container span {
  font-weight: 600;
  font-size: 1.2rem;
  margin-left: 10px;
}

/* Graphique de portefeuille */
.portfolio-chart {
  display: flex;
  height: 150px;
  margin: 1.5rem 0;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.portfolio-bar {
  transition: all 0.5s ease;
}

#actions-bar {
  background-color: #3498db;
}

#real-estate-bar {
  background-color: #2ecc71;
}

#bonds-bar {
  background-color: #f39c12;
}

#cash-bar {
  background-color: #9b59b6;
}

.portfolio-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.legend-item {
  display: flex;
  align-items: center;
}

.legend-color {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  margin-right: 8px;
}

/* Visualisation de corrélation */
.correlation-visual {
  background-color: var(--light-gray);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.enhanced-slider {
  width: 100%;
  margin: 1.5rem 0;
}

.correlation-chart {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0;
  height: 200px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-asset {
  flex: 1;
  position: relative;
  padding: 1rem;
}

.chart-title {
  text-align: center;
  font-weight: 600;
  margin-bottom: 10px;
}

.chart-line {
  position: relative;
  height: 100px;
  width: 100%;
  background-repeat: repeat-x;
  animation: moveChart 10s linear infinite;
  background-position: 0 center;
}

@keyframes moveChart {
  0% { background-position: 0 center; }
  100% { background-position: -1000px center; }
}

.correlation-insights {
  padding: 1.5rem;
  background-color: rgba(52, 152, 219, 0.1);
  border-radius: 8px;
  margin-top: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.correlation-value {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Animation pour les feedback réussite */
.success-animation {
  animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background-color: rgba(46, 204, 113, 0.2); }
  100% { transform: scale(1); }
}

/* Feedback visuel amélioré */
.feedback-card {
  padding: 1.5rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.feedback-card.success {
  background-color: rgba(46, 204, 113, 0.1);
  border-left: 4px solid #2ecc71;
}

.feedback-card.warning {
  background-color: rgba(243, 156, 18, 0.1);
  border-left: 4px solid #f39c12;
}

.feedback-card.error {
  background-color: rgba(231, 76, 60, 0.1);
  border-left: 4px solid #e74c3c;
}

.feedback-card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Styles pour le tutoriel sur les risques */
.risk-types-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 0;
}

.risk-card {
  flex: 1;
  min-width: 300px;
  background: var(--light-gray);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.risk-card:hover {
  transform: translateY(-5px);
}

.risk-visualization {
  height: 100px;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.volatility-waves,
.credit-waves,
.liquidity-waves {
  position: absolute;
  height: 100%;
  width: 100%;
  background-repeat: repeat-x;
  background-position: 0 center;
  animation: waveAnimation 10s linear infinite;
}

.volatility-waves {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0,20 Q 25,0 50,20 T 100,20' stroke='%233498db' fill='transparent' stroke-width='2'/%3E%3C/svg%3E");
}

.credit-waves {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0,20 Q 25,40 50,20 T 100,20' stroke='%23e74c3c' fill='transparent' stroke-width='2'/%3E%3C/svg%3E");
}

.liquidity-waves {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0,20 L 100,20' stroke='%23f39c12' fill='transparent' stroke-width='2'/%3E%3C/svg%3E");
}

@keyframes waveAnimation {
  0% { background-position: 0 center; }
  100% { background-position: -100px center; }
}

/* Mesure du risque */
.risk-measurement {
  background: var(--light-gray);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.volatility-controls {
  margin: 1.5rem 0;
}

.volatility-chart {
  height: 300px;
  margin: 2rem 0;
  background: white;
  border-radius: 8px;
  padding: 1rem;
}

.risk-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.metric {
  flex: 1;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.metric span:first-child {
  display: block;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.metric span:last-child {
  font-weight: 600;
  font-size: 1.2rem;
}

/* Gestion du risque */
.risk-management {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.options-simulation,
.diversification-simulation {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.option-controls,
.portfolio-controls {
  margin: 1rem 0;
}

.option-chart,
.portfolio-chart {
  height: 250px;
  margin: 1.5rem 0;
}

.option-explanation {
  background: var(--light-gray);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Quiz */
.quiz-container {
  background: var(--light-gray);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.quiz-question {
  margin-bottom: 2rem;
}

.quiz-question h3 {
  margin-bottom: 1rem;
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  background: white;
  border: 1px solid var(--medium-gray);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quiz-option:hover {
  background: var(--primary-color);
  color: white;
}

.quiz-option.correct {
  /* border-color: var(--success); */
}

.quiz-option.selected {
  background: var(--primary-color);
  color: white;
}

/* Amélioration de l'alignement sliders allocation */
.allocation-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 4px rgba(52,152,219,0.04);
}

.allocation-row label {
  flex: 0 0 220px;
  margin: 0;
  font-size: 1.08rem;
}

.allocation-row input[type="range"] {
  flex: 1 1 200px;
  margin: 0 0.5rem;
}

.allocation-row .allocation-value {
  min-width: 48px;
  text-align: right;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary-color);
}

@media (max-width: 700px) {
  .allocation-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
  }
  .allocation-row label, .allocation-row .allocation-value {
    text-align: left;
    min-width: unset;
  }
}
