* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e3e3e4;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    max-width: 1200px;
    width: 100%;
}

.connexion-page, .exercise-page {
    display: none;
}

.connexion-page.active, .exercise-page.active {
    display: block;
}

h1 {
    color: #969697;
    margin-bottom: 30px;
    text-align: center;
}

h2 {
    color: black;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.connexion-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 600;
    color: #333;
}

input[type="text"], select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: grey;
}

button {
    background: #969697;
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

.error {
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
    display: none;
    font-size: 1.3em;
}

.exercise {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.exercise h3 {
    color: black;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.checkbox-group, .question {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    background-color: #969697;
    color: white;
    font-weight: 600;
}

td input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.navigation {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.arrow-btn {
    background: #969697;
    width: 100px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-indicator {
    text-align: center;
    color: #666;
    margin-top: 15px;
    font-weight: 600;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #969697;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8em;
}

.modal-content p {
    font-size: 1.2em
}

.instruction {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid grey;
    margin-bottom: 15px;
    border-radius: 5px;
}

.instruction strong {
    color: black;
    display: block;
    margin-bottom: 5px;
}

.modal-btn {
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    font-size: 18px;
}

.exercises-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.welcome-modal {
    background: #e3e3e4;
}

.modal-content {
    text-align: left;
}

.welcome-modal {
    text-align: left;
} 

.welcome-modal h2 {
    color: #969697;
}

.welcome-content {
    color: #333;
    line-height: 1.8;
    margin: 20px 0;
}

.modal-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #555;
    margin-top: 40px; 
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.questions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.question {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.question select {
    max-width: 400px;
}

.center {
    text-align: center;
}

.image-exercice {
    display: block;
    max-width: 180px;
    margin: 10px auto;
}

.container.hidden {
    display: none;
}

.unselectable {
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 1.2em;
}


.lecture-page {
    display: none;
}

.lecture-page.active {
    display: block;
}
.modal-large {
    max-width: 90%;
}

.corrections-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    margin: 20px 0;
}

.corrections-container img {
    width: 100%;
    max-width: 800px;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.calculator-btn {
    margin: 15px auto;
    display: block;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-calculatrice {
    width: 100%;
    max-width: 500px;
}

.calculator-frame {
    width: 100%;
    height: 400px;
    border: none;
    margin-right: 15px 0;
}

.instruction img {
    width: 40px;
    height: auto;
    vertical-align: middle;
    margin-right: 8px;
}
.bouton-calculatrice img {
    width: 40px;
    height: auto;
    vertical-align: middle;
}

.bouton-calculatrice button {
    border-radius: 10px;
}

.timer {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #222;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 9999;
}

.timer.hidden {
    display: none;
}

.connexion-page p {
    font-size: 1.2em;
}

.progression {
    display: flex;
    justify-content: space-between;
    width: 80%;
    margin: 30px auto;
    position: relative;
  }
  
  
  .progression::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: #969697;
    transform: translateY(-50%);
    z-index: 0;
  }
  
  
  .progression span {
    width: 22px;
    height: 22px;
    background: #969697;
    border-radius: 50%;
    z-index: 1;
  }
  
  
  .etape-1 span:nth-child(-n+1),
  .etape-2 span:nth-child(-n+2),
  .etape-3 span:nth-child(-n+3),
  .etape-4 span:nth-child(-n+4),
  .etape-5 span:nth-child(-n+5),
  .etape-6 span:nth-child(-n+6),
  .etape-7 span:nth-child(-n+7),
  .etape-8 span:nth-child(-n+8),
  .etape-9 span:nth-child(-n+9),
  .etape-10 span:nth-child(-n+10) {
    background: #4a4a4a;
  }
  