/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Brand Quest Theme Variables */
:root {
  --yellow: #f9c75b;
  --magenta: #ff4fa8;
  --green: #30c1a0;
  --blue: #2f7bff;
  --orange: #ff8d3c;
  --text: #111;
  --muted: #555;
  --page-width: 800px;
  --gutter: 36px;
}

/* Page styling */
.page {
  width: 100%;
  max-width: var(--page-width);
  background: #fff;
  border: 20px solid var(--yellow);
  margin: 20px auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.page .inner {
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}

/* Section Title */
.section-title {
  color: #000000;
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* Rule Items */
.rules-container {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin: 40px 0;
}

.rule-item {
  border-left: 4px solid var(--blue);
  padding-left: 20px;
  padding-bottom: 25px;
  margin-bottom: 15px;
}

.rule-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rule-item h2.sub {
  color: #e82d88;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 8px;
}

.rule-item h2.sub:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #e82d88;
}

.rule-item h3.sub {
  color: #44b69c;
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rule-item p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 15px;
}

/* Lists */
.bullets {
  list-style-type: none;
  padding: 0;
  margin: 10px 0 20px 15px;
}

.bullets li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 8px;
  line-height: 1.5;
  color: var(--text);
}

.bullets li:before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--magenta);
  font-weight: bold;
  font-size: 20px;
  line-height: 1;
}

.goal-list {
  list-style-type: none;
  padding: 0;
  margin: 15px 0 15px 15px;
}

.goal-list > li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--text);
}

.goal-list > li:before {
  content: counter(list-item) '.';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: bold;
}

.space {
  background: rgba(249, 199, 91, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  border-left: 3px solid var(--orange);
}

.space-title {
  color: var(--orange) !important;
  font-size: 18px !important;
  margin: 0 0 10px 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  padding-bottom: 5px !important;
  border-bottom: 1px dashed rgba(0,0,0,0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .rule-item {
    padding-left: 15px;
  }
  
  .rule-item h2.sub {
    font-size: 20px;
  }
  
  .rule-item p, .bullets li {
    font-size: 15px;
  }
  
  .space {
    padding: 12px;
  }
}

/* Button Styling */
.btn-group {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  background-color: var(--blue);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background-color: #1a5fd8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .page {
    border-width: 15px;
    margin: 10px;
  }
  
  .page .inner {
    padding: 25px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .rule-item h2.sub {
    font-size: 20px;
  }
  
  .rule-item p {
    font-size: 15px;
  }
}

/* Active state for rules section */
#rules {
  display: none;
}

#rules.active {
  display: block;
}

body {
    background-color: #306bff;
    color: #333;
    line-height: 1.6;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Elms Sans', sans-serif;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    width: auto;
}

.btn {
    display: inline-block;
    background: #f2c63d;
    color: white;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 10px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    width: 200px;
}

.btn:hover {
    background: #f2c63d;
    transform: translateY(-2px);
}

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

.btn:focus {
    outline: 3px solid #f2c63d;
    outline-offset: 2px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.active {
    display: block;
}

/* Rules section */
.rules {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.rules h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.rules ol {
    padding-left: 20px;
}

.rules li {
    margin-bottom: 10px;
}

/* Quiz section */
#quiz {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.question-container {
    width: 100%;
    padding: 1rem 0;
}

.question {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.4;
    color: #2c3e50;
    padding: 0 1rem;
}

.progress {
    text-align: center;
    margin-bottom: 2rem;
    color: #7f8c8d;
    font-weight: 500;
    font-size: 1.1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.option {
    background: #f9f9f9;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    font-size: 1.1rem;
    text-align: left;
}

.option:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.option.selected {
    background: #f2c63d;
    color: white;
    border-color: #e6b800;
}

.option.correct {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.option.wrong {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    width: 100%;
    gap: 1rem;
}

.navigation .btn {
    flex: 1;
    max-width: 200px;
    margin: 0;
}

/* Results section */
.result {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h2 {
    color: #2ecc71;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.result-header p {
    font-size: 1.2rem;
    color: #555;
    font-weight: 600;
}

.question-result {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.question-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.user-answer {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-weight: 500;
}

.user-answer.correct {
    background-color: #e8f8f0;
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

.user-answer.incorrect {
    background-color: #fde8e8;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.correct-answer {
    color: #27ae60;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #e8f8f0;
    border-radius: 6px;
    display: inline-block;
}

#resultTitle {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

#scoreText {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

#feedback {
    margin: 2rem auto;
    line-height: 1.6;
    font-size: 1.1rem;
    max-width: 800px;
    text-align: left;
}

/* Style pour les réponses incorrectes */
.answers-summary {
    margin-top: 2rem;
    background: #fff9f9;
    border-left: 4px solid #ff6b6b;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.incorrect-answer {
    background: #fff0f0;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.incorrect-answer p {
    margin: 0.5rem 0;
}

.correct-answer {
    background: #f0f9f0;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.correct-answer p {
    margin: 0.5rem 0;
}

.correct-option {
    color: #2ecc71;
    font-weight: 500;
    margin-top: 0.8rem !important;
    padding: 0.8rem;
    background: #e8f5e9;
    border-radius: 6px;
    border-right: 3px solid #2ecc71;
}

.result-message {
    font-size: 1.2rem;
    margin-bottom: 2rem !important;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.result {
    text-align: center;
    margin-top: 2rem;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2rem;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.failure {
    background-color: #f8d7da;
    color: #721c24;
}

.hidden {
    display: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
        min-height: auto;
    }
    
    .question {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .option {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .navigation {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .navigation .btn {
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    #resultTitle {
        font-size: 1.5rem;
    }
    
    #scoreText {
        font-size: 1.3rem;
    }
}

/* Focus styles for accessibility */
button:focus-visible, 
[tabindex="0"]:focus-visible {
    outline: 3px solid #f2c63d;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: white;
    color: #f2c63d;
    opacity: 0;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
}
