/*
 * Cloze Editor — Styles pour l'editeur visuel texte a trous
 */

/* =======================================================================
   CHIPS VISUELS (TROUS)
   ======================================================================= */

.cloze-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    vertical-align: baseline;
    font-weight: 500;
    transition: filter 100ms ease;
    margin: 0 1px;
}

.cloze-chip:hover {
    filter: brightness(0.92);
}

/* QCM (bleu) */
.cloze-chip--multichoice {
    background: #e8f0fe;
    border: 1px solid #a8c7fa;
    color: #1a73e8;
}

.cloze-chip--multichoice::after {
    content: ' \25BE';
    font-size: 10px;
    opacity: 0.5;
}

/* Reponse courte (jaune) */
.cloze-chip--shortanswer {
    background: #fef7e0;
    border: 1px solid #fdd663;
    color: #e37400;
}

/* Numerique (vert) */
.cloze-chip--numerical {
    background: #e6f4ea;
    border: 1px solid #a8dab5;
    color: #137333;
}

/* =======================================================================
   EDITABLE CLOZE
   ======================================================================= */

.cloze-editable {
    min-height: 60px;
    line-height: 1.8;
}

/* =======================================================================
   MODALE DE CONFIGURATION
   ======================================================================= */

.cloze-modal {
    width: 440px;
    max-width: calc(100vw - 48px);
}

.cloze-modal__body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Selecteur de type (3 boutons) */
.cloze-modal__type-row {
    display: flex;
    gap: 6px;
}

.cloze-modal__type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #f5f5f7;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 100ms ease;
}

.cloze-modal__type-btn:hover {
    background: #ebebf0;
    color: #1d1d1f;
}

.cloze-modal__type-btn--active {
    background: #007AFF;
    border-color: #007AFF;
    color: #ffffff;
}

/* Champs de la modale */
.cloze-modal__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cloze-modal__field label {
    font-size: 11px;
    font-weight: 500;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cloze-modal__field-row {
    display: flex;
    gap: 12px;
}

.cloze-modal__field-row > .cloze-modal__field {
    flex: 1;
}

/* Liste de reponses (mauvaises ou alternatives) */
.cloze-modal__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cloze-modal__list-item {
    display: flex;
    gap: 4px;
    align-items: center;
}

.cloze-modal__list-item input {
    flex: 1;
}

.cloze-modal__remove-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #FF3B30;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: background-color 100ms ease;
}

.cloze-modal__remove-btn:hover {
    background: #fff5f5;
}

.cloze-modal__add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px dashed #d2d2d7;
    border-radius: 6px;
    background: transparent;
    color: #007AFF;
    font-size: 12px;
    cursor: pointer;
    margin-top: 4px;
    transition: background-color 100ms ease;
}

.cloze-modal__add-btn:hover {
    background: #f0f4ff;
}
