/* Retours utilisateurs : signaler un bug, noter l'application (js/feedback.js).
   La fenêtre réutilise la structure de la fenêtre Aide (.help-modal,
   .help-modal-content, .help-modal-head) ; ce fichier n'ajoute que le contenu. */

/* Les entrées « Signaler un bug » / « Noter » sont des boutons, pas des liens :
   on neutralise le style natif pour qu'elles ressemblent aux autres. */
button.help-entry {
  width: 100%;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.feedback-modal { z-index: 10001; }
.feedback-modal .help-modal-content { max-width: 460px; }

.feedback-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.feedback-form { display: flex; flex-direction: column; gap: 14px; }
.feedback-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.feedback-field > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.feedback-field em { font-style: normal; font-weight: 500; color: var(--text-muted); }
.feedback-field .form-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; }
.feedback-field textarea.form-input { resize: vertical; min-height: 96px; line-height: 1.45; }
.feedback-count { align-self: flex-end; font-size: 11.5px; color: var(--text-muted); }

/* Captures : vignettes carrées + case « Ajouter » de même taille. */
.feedback-shots { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback-shot { position: relative; width: 76px; height: 76px; }
.feedback-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.feedback-shot button {
  position: absolute; top: -8px; right: -8px;
  width: 26px; height: 26px;
  border: 2px solid var(--bg-primary); border-radius: 50%;
  background: var(--text-primary); color: var(--bg-primary);
  font-size: 16px; line-height: 1;
  cursor: pointer;
}
.feedback-shot-add {
  width: 76px; height: 76px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px dashed var(--border); border-radius: 10px;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: 20px;
  cursor: pointer;
}
.feedback-shot-add span { font-size: 11.5px; font-weight: 600; }
.feedback-shot-add:hover { border-color: var(--accent); color: var(--accent); }

.feedback-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, #d97706 12%, transparent);
  border: 1px solid color-mix(in srgb, #d97706 35%, transparent);
  font-size: 12.5px; line-height: 1.45;
  color: var(--text-primary);
}
.feedback-context { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.feedback-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, #dc2626 10%, transparent);
  border: 1px solid color-mix(in srgb, #dc2626 35%, transparent);
  color: #b91c1c;
  font-size: 13px;
}
[data-theme="dark"] .feedback-error { color: #fca5a5; }
.feedback-error[hidden] { display: none; }

.feedback-submit, .feedback-actions .btn { min-height: 46px; }
.feedback-submit { width: 100%; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.feedback-actions .btn { flex: 1 1 160px; }
.feedback-actions .btn[hidden] { display: none; }
.feedback-actions + .feedback-context { margin-top: 12px; }

/* Étoiles : cibles de 48 px, plancher tactile tenu. */
.feedback-stars { display: flex; justify-content: center; gap: 2px; margin: 4px 0 0; }
.feedback-stars button {
  width: 48px; height: 48px;
  border: 0; background: transparent;
  font-size: 34px; line-height: 1;
  color: color-mix(in srgb, var(--text-muted) 35%, transparent);
  cursor: pointer;
  transition: transform .12s ease, color .12s ease;
}
.feedback-stars button.on { color: #f5b301; }
.feedback-stars button:hover { transform: scale(1.12); }
.feedback-stars button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.feedback-star-label {
  margin: 2px 0 10px;
  min-height: 20px;
  text-align: center;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-muted);
}
.feedback-body [data-fb-comment-wrap] { margin-bottom: 10px; }
.feedback-body [data-fb-comment-wrap][hidden],
.feedback-ask [data-fb-comment-wrap][hidden] { display: none; }

/* Carte « Votre avis compte » en tête de la fenêtre Aide. */
.feedback-ask {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, #f5b301 45%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, #f5b301 8%, var(--bg-primary));
  text-align: center;
}
.feedback-ask-title { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--text-primary); }
.feedback-ask .feedback-lead { margin-bottom: 6px; }
.feedback-ask .feedback-context { margin-top: 10px; }

/* Confirmation après envoi. */
.feedback-done { text-align: center; padding: 8px 0 4px; }
.feedback-done p { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--text-primary); }
.feedback-done-ic {
  width: 52px; height: 52px; margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, #059669 14%, transparent);
  color: #059669;
  font-size: 26px; font-weight: 800;
}
.feedback-done .feedback-actions { margin-top: 14px; }

/* Pastille sur ❓ quand une note peut être demandée. */
#headerHelpBtn { position: relative; }
#headerHelpBtn.has-feedback-ask::after {
  content: "";
  position: absolute; top: 8px; right: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #f5b301;
  box-shadow: 0 0 0 2px var(--header-bg, #fff);
}
