/* ============================================
   STYLES GÉNÉRAUX
   ============================================ */

/* Sur la même ligne */
.nowrap {
    white-space: nowrap;
}

svg {
    overflow: visible;
}

/* Inputs élèves standardisés */
.student-input {
    background: rgb(17, 51, 28);
    border: 2px solid #4CAF50;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #FFF;
    text-align: center;
    position: relative;
}

.student-input:focus {
    outline: none;
    border-color: #2196F3;
    background: rgb(20, 60, 32);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.student-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Barre d'outils flottante pour caractères mathématiques spéciaux */
.math-toolbar {
    position: absolute;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.95), rgba(21, 101, 192, 0.95));
    border: 2px solid #2196F3;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(33, 150, 243, 0.3);
    animation: mathToolbarSlideIn 0.2s ease-out;
}

@keyframes mathToolbarSlideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.math-toolbar-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 20px;
    color: #FFF;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.math-toolbar-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.math-toolbar-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.4);
}


/* ============================================
   COMPOSANT 1 : FRACTION INTERACTIVE
   ============================================ */

.fraction-interactive {
    display: inline-block;
    margin: 15px 0;
    padding: 5px;
    vertical-align: middle;
}

.fraction-numerator,
.fraction-denominator {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    font-size: 22px;
    color: #FFF;
}

.fraction-line {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
}

.fraction-numerator input,
.fraction-denominator input {
    width: 50px;
    margin: 0;
}


/* ============================================
   COMPOSANT 2 : OPÉRATION POSÉE ADDITION/SOUSTRACTION
   ============================================ */

.operation-posee {
    display: inline-block;
    margin: 15px auto;
    padding: 5px;
}

input[value="?"] {
  color: rgb(255, 41, 41);
}

textarea[value="?"] {
  color: rgb(255, 41, 41);
}

.operation-table {
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    color: #FFF;
    margin: 0 auto;
}

.operation-table td {
    padding: 8px 12px;
    text-align: center;
    min-width: 40px;
}

.operation-retenue {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.retenue-col {
    padding: 2px 8px;
    font-size: medium;
    font-style: italic;
    opacity: 0.7;
    color: #fffb1b;
}

.retenue-col input {
    width: 25px;
    font-size: 14px;
    padding: 0;
    border-radius: 50%;
    min-width: 25px;
    text-align: center;
    opacity: 1;
}

.operation-nombre1 {
    font-weight: 600;
}

.operation-operateur .operateur {
    text-align: center;
    padding-right: 5px;
    font-weight: bold;
    color: #4CAF50;
}

.operation-trait td {
    padding: 5px 0;
}

.operation-line {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    margin: 0;
    width: 100%;
}

.operation-resultat {
    font-weight: bold;
    color: #FFF;
}

.operation-resultat input {
    width: 35px;
    font-weight: bold;
}

.centaines,
.dizaines,
.unites {
    font-variant-numeric: tabular-nums;
}

.operateur-spacer {
    width: 30px;
    padding: 0;
}


/* ============================================
   COMPOSANT 3 : OPÉRATION POSÉE MULTIPLICATION
   ============================================ */

.operation-posee-mult {
    display: inline-block;
    margin: 15px auto;
    padding: 5px;
}

/* Réutilisation de .operation-table définie pour l'addition */

.mult-retenue {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.mult-retenue .retenue-col input {
    width: 25px;
    font-size: 14px;
    padding: 0;
    border-radius: 50%;
    min-width: 25px;
    text-align: center;
}

.mult-nombre1 {
    font-weight: 600;
}

.mult-operateur .operateur {
    text-align: center;
    padding-right: 5px;
    font-weight: bold;
    color: #4CAF50;
}

.mult-intermediaire {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.mult-intermediaire input {
    width: 35px;
}

.mult-resultat {
    font-weight: 600;
}

.mult-resultat input {
    width: 35px;
    font-weight: bold;
}

/* Réutilisation des classes .centaines, .dizaines, .unites, .operateur-spacer déjà définies pour l'addition */


/* ============================================
   COMPOSANT 4 : OPÉRATION POSÉE DIVISION
   ============================================ */

.division-posee {
    margin: 20px 0;
    display: inline-block;
    padding: 5px;
}

.division-posee input{
    min-width: 25px;
    width: 25px;
    padding: 5px;
    border: none;

}

.division-posee .student_error{
    background: rgb(99 0 0);
    
}

.division-layout input {
    min-width: 25px;
    width: 25px;
    padding: 5px;
}
 
.division-layout {
    display: inline-flex;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    color: #FFF;
    align-items: stretch;
    gap: 0;
}

.division-gauche {
    display: flex;
    flex-direction: column;
    padding-right: 15px;
    min-width: 120px;
}

.division-table {
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    color: #FFF;
    table-layout: fixed;
}

.division-table td {
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    padding: 4px 8px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.division-table td.signe-col {
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    padding-left: 0;
    padding-right: 5px;
    text-align: right;
}

.division-dividende {
    padding: 5px 0 5px 30px;
    text-align: left;
    font-size: 28px;
}

.division-barre-verticale {
    width: 3px;
    background: rgba(255, 255, 255, 0.9);
    align-self: stretch;
    margin: 0;
}

.division-droite {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.division-diviseur {
    padding: 5px 0 5px 15px;
    text-align: left;
}

.division-trait-horizontal {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
}

.division-quotient {
    padding: 5px 0 5px 15px;
    text-align: left;
}


.division-etapes {
    margin-top: 10px;
}

.division-etapes-table {
    border-collapse: collapse;
    font-family: 'Courier New', monospace;
    font-size: 22px;
    color: #FFF;
    width: 100%;
}

.division-etapes-table tr {
    height: auto;
}

.signe-col {
    width: 25px;
    text-align: left;
    padding-left: 0;
    padding-right: 5px;
    vertical-align: top;
    color: #FFF;
    font-weight: bold;
}

.nombre-col {
    text-align: left;
    padding-left: 0;
    min-width: 80px;
}

.etape-trait td {
    padding: 3px 0;
}

.etape-line {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.9);
    margin: 0;
    width: 100%;
}

.division-etapes-table input {
    width: 60px;
}

.division-reste-inline {
    margin-top: 10px;
    margin-left: 30px;
    font-size: 20px;
    color: #FFF;
    font-weight: 600;
}

.division-reste-inline input {
    width: 50px;
}

.etape-soustraction,
.etape-resultat {
    /* Classes pour les lignes d'étapes */
}


/* ============================================
   COMPOSANT 5 : ÉQUATION À RÉSOUDRE
   ============================================ */

.equation-solve {
    margin: 20px 0;
    padding: 5px;
}

.equation-enonce {
    font-size: 24px;
    margin-bottom: 15px;
    color: #FFF;
    font-weight: 600;
}

.equation-etapes {
    margin: 15px 0;
    padding-left: 30px;
}

.equation-etapes .etape {
    margin: 10px 0;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 10px;
}

.equation-etapes .etape input {
    width: 60px;
}

.equation-solution {
    margin-top: 20px;
    font-size: 24px;
    color: #4CAF50;
    font-weight: bold;
    padding: 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 5px;
    display: inline-block;
}

.equation-solution input {
    width: 70px;
    font-weight: bold;
    background: rgb(20, 60, 32);
}


/* ============================================
   COMPOSANT 6 : TABLEAU DE VALEURS
   ============================================ */

.tableau-valeurs {
    margin: 20px 0;
    padding: 5px;
}

.valeurs-table {
    border-collapse: collapse;
    margin: 10px auto;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.valeurs-table th,
.valeurs-table td {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    text-align: center;
    font-size: 20px;
    color: #FFF;
}

.valeurs-table th {
    background: rgba(76, 175, 80, 0.2);
    font-weight: bold;
    font-size: 22px;
}

.valeurs-table td {
    background: rgba(255, 255, 255, 0.03);
}

.cell-input {
    width: 70px;
    margin: 0 auto;
}


/* ============================================
   COMPOSANT 7 : TABLEAU DE PROPORTIONNALITÉ
   ============================================ */

.tableau-proportionnalite {
    margin: 20px 0;
    padding: 5px;
}

.proportion-table {
    border-collapse: collapse;
    margin: 10px auto;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.proportion-table td {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 25px;
    text-align: center;
    font-size: 20px;
    color: #FFF;
    min-width: 100px;
}

.proportion-ligne1 td:first-child,
.proportion-ligne2 td:first-child {
    background: rgba(255, 193, 7, 0.2);
    font-weight: bold;
    text-align: left;
}

.proportion-ligne1 {
    background: rgba(33, 150, 243, 0.1);
}

.proportion-ligne2 {
    background: rgba(76, 175, 80, 0.1);
}

.proportion-calcul {
    margin-top: 15px;
    padding: 10px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.proportion-calcul input {
    width: 60px;
}


/* ============================================
   COMPOSANT 8 : CONVERSION D'UNITÉS
   ============================================ */

.conversion-unites {
    margin: 20px 0;
    padding: 5px;
}

.conversion-titre {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.conversion-table {
    border-collapse: collapse;
    margin: 10px auto;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.conversion-table th {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    font-size: 18px;
    font-weight: bold;
    color: #FFF;
    min-width: 50px;
}

.conversion-table td {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 15px;
    text-align: center;
    font-size: 22px;
    color: #FFF;
    background: rgba(255, 255, 255, 0.05);
    min-width: 50px;
}

.conversion-nombre input {
    width: 35px;
    padding: 5px;
}

.conversion-resultat {
    margin-top: 15px;
    font-size: 22px;
    color: #4CAF50;
    font-weight: bold;
}

.conversion-resultat input {
    width: 100px;
    font-weight: bold;
}


/* ============================================
   COMPOSANT 10 : SUITE NUMÉRIQUE
   ============================================ */

.suite-numerique {
    margin: 20px 0;
    padding: 5px;
}

.suite-titre {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.suite-nombres {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.suite-element {
    font-size: 28px;
    color: #FFF;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.suite-element input {
    width: 60px;
    font-size: 24px;
    font-weight: bold;
}

.suite-separator {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 5px;
}

.suite-question {
    margin-top: 20px;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.suite-question input {
    width: 60px;
}


/* ============================================
   COMPOSANT 11 : QCM / CHOIX MULTIPLES
   ============================================ */

.qcm-component {
    margin: 20px 0;
    padding: 5px;
}

.qcm-question {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.qcm-choices {
    margin: 15px 0;
    padding-left: 10px;
}

.qcm-choice {
    margin: 12px 0;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qcm-choice:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.qcm-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.qcm-choice label {
    font-size: 20px;
    color: #FFF;
    cursor: pointer;
    flex: 1;
}

.qcm-choice.student-selected-choice {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.2), rgba(139, 195, 74, 0.3));
    border-left: 4px solid #4CAF50;
    padding-left: 8px;
    border-radius: 4px;
}

.qcm-choice.student-selected-choice label {
    font-weight: bold;
}


/* ============================================
   COMPOSANT 12 : TEXTE À TROUS
   ============================================ */

.texte-trous {
    margin: 20px 0;
    padding: 5px;
}

.texte-contenu {
    font-size: 20px;
    color: #FFF;
    line-height: 2;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.texte-contenu input {
    margin: 0 5px;
    vertical-align: baseline;
}

.texte-mots-banque {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border-left: 3px solid #FFC107;
}

.mot-disponible {
    display: inline-block;
    margin: 5px 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 18px;
    color: #FFF;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}


/* ============================================
   COMPOSANT 13 : ORDRE / TRI
   ============================================ */

.ordre-tri {
    margin: 20px 0;
    padding: 5px;
}

.ordre-consigne {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.ordre-elements {
    margin: 15px 0;
}

.ordre-element {
    margin: 12px 0;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 22px;
    color: #FFF;
}

.ordre-element input {
    width: 40px;
    font-size: 20px;
    font-weight: bold;
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}


/* ============================================
   COMPOSANT 14 : CORRESPONDANCE / APPARIEMENT
   ============================================ */

.correspondance {
    margin: 20px 0;
    padding: 5px;
}

.correspondance-consigne {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
}

.correspondance-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
    margin: 20px 0;
}

.correspondance-colonne {
    flex: 1;
    max-width: 400px;
}

.correspondance-colonne.gauche {
    text-align: right;
}

.correspondance-colonne.droite {
    text-align: left;
}

.corresp-element {
    margin: 15px 0;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 20px;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 10px;
}

.correspondance-colonne.gauche .corresp-element {
    justify-content: flex-end;
}

.correspondance-colonne.droite .corresp-element {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4CAF50;
}

.corresp-element input {
    width: 40px;
    font-size: 18px;
    font-weight: bold;
}


/* ============================================
   COMPOSANT 15 : ZONE DE CALCUL LIBRE
   ============================================ */

.zone-calcul {
    margin: 20px 0;
    padding: 5px;
}

.calcul-consigne {
    font-size: 22px;
    color: #FFF;
    margin-bottom: 15px;
    font-weight: 600;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    border-left: 3px solid #2196F3;
}

.calcul-zone {
    margin: 15px 0;
}

.calcul-textarea {
    width: 100%;
    min-height: 150px;
    background: rgb(17, 51, 28);
    border: 2px solid #4CAF50;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #FFF;
    line-height: 1.6;
    resize: vertical;
}

.calcul-textarea:focus {
    outline: none;
    border-color: #2196F3;
    background: rgb(20, 60, 32);
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.5);
}

.calcul-reponse {
    margin-top: 20px;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    font-size: 22px;
    color: #FFF;
    font-weight: bold;
}

.calcul-reponse input {
    width: 120px;
    font-size: 20px;
    font-weight: bold;
}


/* ============================================
   DRAG & DROP
   ============================================ */

/* Éléments draggables */
.draggable {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: none;
}

.draggable:active {
    cursor: grabbing;
}

/* État pendant le drag */
.dragging {
    opacity: 0.6;
    transform: scale(1.05);
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* Zones de drop */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
    min-width: 80px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    /* Pas de display fixe - on garde le display naturel de l'élément */
}

/* Dropzones dans des cellules de tableau */
td.dropzone {
    height: 100px;
}  

/* Dropzone avec centrage (optionnel, pour dropzones indépendantes) */
.dropzone-centered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dropzone en mode flex horizontal (pour mettre plusieurs dropzones côte à côte) */
.dropzone-inline {
    display: inline-block;
    vertical-align: top;
}

/* Container pour éléments draggables sources */
.drag-source-container {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Container pour dropzones de destination */
.dropzone-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Container vertical pour dropzones (pour tri d'éléments longs) */
.dropzone-container-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Style pour élément draggable dans contexte ordre/tri */
.draggable-card {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 22px;
}

/* Dropzone pour classification (plus grande, plusieurs éléments) */
.dropzone-large {
    min-width: 150px;
    min-height: 100px;
}

/* Dropzone en mode vertical (pleine largeur pour textes longs) */
.dropzone-vertical {
    display: block;
    width: 100%;
    min-height: 60px;
}

/* Survol avec un élément draggable */
.dropzone.drag-over {
    border-color: #4CAF50;
    border-style: solid;
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    transform: scale(1.02);
}

/* Dropzone contenant un élément */
.dropzone.has-item {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* Validation : placement correct */
.dropzone.correct {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    animation: pulse-success 0.5s ease;
}

/* Validation : placement incorrect */
.dropzone.incorrect {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.2);
    animation: shake 0.5s ease;
}

/* Label pour dropzones vides */
.dropzone-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    font-style: italic;
    text-align: center;
    pointer-events: none;
    position: absolute;
}

.dropzone.has-item .dropzone-label {
    display: none;
}

/* Animations */
@keyframes pulse-success {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}


/* ============================================
   COMPOSANT : RACINE CARRÉE (√)
   ============================================ */

.sqrt {
    display: inline-flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 5px; 
    vertical-align: middle;
    font-size: inherit;
}

.sqrt-symbol {
    font-weight: bold;
    color: #4CAF50;
    margin-right: 2px;
    display: flex;
    align-items: stretch;
    line-height: 1;
    flex-shrink: 0;
    height: 100%;
    position: relative;
    top: 7px;
    left: 5px;
    font-family: 'Courier New', monospace;
}

.sqrt-symbol::before {
    content: '√';
    align-self: stretch;
}

.sqrt-content {
    border-top: 2px solid #4CAF50;
    padding: 5px 10px 2px 5px;
    position: relative;
    display: flex;
    align-items: center;
}


/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .fraction-interactive,
    .operation-posee,
    .operation-posee-mult,
    .division-posee,
    .equation-solve,
    .tableau-valeurs,
    .tableau-proportionnalite,
    .conversion-unites,
    .suite-numerique,
    .qcm-component,
    .texte-trous,
    .ordre-tri,
    .correspondance,
    .zone-calcul {
        padding: 10px;
        margin: 10px 0;
    }

    .operation-table {
        font-size: 20px;
    }

    .operation-table td {
        padding: 6px 8px;
        min-width: 30px;
    }

    .fraction-numerator,
    .fraction-denominator {
        font-size: 18px;
        min-height: 25px;
        padding: 3px 8px;
    }

    .valeurs-table th,
    .valeurs-table td {
        padding: 8px 12px;
        font-size: 16px;
    }

    .correspondance-container {
        flex-direction: column;
        gap: 20px;
    }

    .correspondance-colonne {
        max-width: 100%;
        text-align: left !important;
    }

    .equation-enonce,
    .qcm-question,
    .ordre-consigne,
    .correspondance-consigne,
    .calcul-consigne,
    .suite-titre,
    .conversion-titre {
        font-size: 18px;
    }

    .suite-element {
        font-size: 22px;
        min-width: 40px;
    }

    .calcul-textarea {
        font-size: 16px;
        padding: 10px;
    }

    /* Drag & Drop - Mobile */
    .dropzone {
        min-height: 70px;
        min-width: 70px;
        padding: 18px;
    }

    .dropzone-label {
        font-size: 14px;
    }

    .draggable {
        min-height: 50px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }
}


/* ============================================
   COMPOSANT : DISQUE PARTAGÉ (FRACTIONS)
   ============================================ */

.disc-partage-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.disc-partage {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Disque SVG avec bordures */
.disc-partage-svg {
    width: 300px;
    height: 300px;
}

.disc-partage-svg path {
    transition: opacity 0.3s ease;
}

.disc-partage-svg path:hover {
    opacity: 0.8;
}

/* Labels optionnels sur les parts */
.disc-part-label {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .disc-partage,
    .disc-partage-svg {
        width: 250px;
        height: 250px;
    }

    .disc-part-label {
        font-size: 16px;
    }
}