/* jcloze/jcloze.css */
    :root{
      --hp-accent: #004080;
    }
    body {
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
      color: #0b2340;
      background: #fff;
      padding: 1rem;
    }
    .exercise-header { text-align: center; margin-bottom: .5rem; }
    .exercise-card { background: #f7f9ff; border: 1px solid #e1e7f7; }
    .gap-input { font-weight: 600; min-width: 3.5rem; }
    .keypad button { margin: .15rem .1rem; min-width: 2.4rem; }
    .func-btn { min-width: 4.5rem; }
    .feedback-correct { color: #0b6b2e; }
    .feedback-wrong { color: #b02a37; }
    @media (max-width: 576px) {
      .gap-input { min-width: 2.6rem; font-size: .95rem; }
      .keypad button { min-width: 2rem; padding: .25rem .35rem; }
    }
.cloze-input {
  display: inline-block;
  padding: 0 .25rem;
  margin: 0 .1rem;
  min-width: 2.5ch; /* Taille minimale */
  border: 0;
  border-bottom: 2px solid #0b2340;
  background: transparent;
  font-weight: 600;
  outline: none;
}
.cloze-input:focus {
  border-bottom-color: #0056b3;
}
/* Modernisation JCloze */
/* Espacement entre le texte et les mots à trou */
.GapSpan {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}

.GapSpan input.GapBox {
    margin: 0 4px;
}

.ClozeBody {
    font-family: 'Nunito', sans-serif;
    max-width: 750px;
    margin: 0 auto;        /* centre le contenu */
    font-size: 1.1rem;
    line-height: 1.7;
    background: #fafafa;
    padding: 1.4rem 1.8rem;
    border-radius: 8px;
    border-left: 4px solid #6c63ff;
}


.ClozeSentence {
    padding: .25rem 0;
    transition: background .25s ease;
}

.ClozeSentence.active {
    background: #fff3cd;  /* Jaune pastel */
    padding-left: .5rem;
}


/* Fenêtre de feedback flottante, centrée */
#FeedbackDiv {
    position: fixed;
    top: 20%;                 /* un peu sous le haut de l'écran */
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: calc(100% - 2rem); /* marges sur petits écrans */
    z-index: 1050;
    display: none;

    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    padding: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.15);

    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity .2s ease, transform .2s ease;
}

/* État visible */
#FeedbackDiv.show {
    opacity: 1;
    transform: translate(50%, 0);
}


/* Centrage sur grands écrans */
@media (min-width: 768px) {
    #FeedbackDiv {
        left: 0;
    }
}

@media (max-width: 576px) {
    .ClozeBody {
        line-height: 1.4;
        font-size: 1rem;
    }
}

@media (min-width: 992px) {
    .ClozeBody {
        line-height: 1.8;
        font-size: 1.15rem;
    }
}

.GapBox {
  display: inline-block;
  padding: 0 .25rem;
  margin: 0;
  min-width: 3ch; /* taille minimale comme mot manquant */
  border: 0;
  border-bottom: 2px solid #0b2340;
  background: transparent;
  font-weight: 600;
  font-size: inherit;
  line-height: 1.2;
}

.GapBox:focus {
  border-bottom-color: #0d6efd; /* bleu bootstrap */
  outline: none;
}

.FuncButton {
  padding: .15rem .35rem;
  font-size: .8rem;
  border-radius: .3rem;
  line-height: 1.1;
  border: 1px solid #6c757d;
  background-color: #e9ecef;
  cursor: pointer;
}

.FuncButton:hover {
  background-color: #ced4da;
}

.GapSpan .FuncButton {
  margin-left: .15rem;
}
/* Champs correct / incorrect / vide (complément de Bootstrap) */
.GapBox.is-valid {
    border-color: #28a745 !important;
}

.GapBox.is-invalid {
    border-color: #dc3545 !important;
}

.GapBox.is-empty {
    border-color: #adb5bd !important; /* gris neutre */
    background-color: #f8f9fa;
}
.is-incomplete {
    border-color: #f0ad4e !important;   /* orange Bootstrap */
    background-color: #fff6e0 !important;
}

/* ================================
   JCloze – Audio compact
   ================================ */

.jcloze-has-audio audio {
    width: 34px;
    height: 28px;
}

.jcloze-has-audio audio::-webkit-media-controls-panel {
    background: transparent;
}

.jcloze-has-audio audio::-webkit-media-controls-timeline,
.jcloze-has-audio audio::-webkit-media-controls-volume-slider,
.jcloze-has-audio audio::-webkit-media-controls-current-time-display,
.jcloze-has-audio audio::-webkit-media-controls-time-remaining-display {
    display: none;
}


/* ================================
   JCloze – SELECT (menus déroulants)
   ================================ */

.GapSpan select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 0 .35rem;
  margin: 0;
  min-width: 3ch;

  border: 0;
  border-bottom: 2px solid #0b2340;
  background-color: transparent;

  font-weight: 600;
  font-size: inherit;
  line-height: 1.2;

  cursor: pointer;
}
/* États de correction pour SELECT */

.GapSpan select.is-valid {
  border-bottom-color: #28a745 !important;
  background-color: #e6f4ea;
}

.GapSpan select.is-invalid {
  border-bottom-color: #dc3545 !important;
  background-color: #fdecea;
}

.GapSpan select.is-empty {
  border-bottom-color: #adb5bd !important;
  background-color: #f8f9fa;
}

.GapSpan select.is-incomplete {
  border-bottom-color: #f0ad4e !important;
  background-color: #fff6e0;
}
.GapSpan select:focus {
  border-bottom-color: #0d6efd;
  outline: none;
}
