/* Fiche Évaluation Smartphone – KAMUCO */

.fes-fiche {
  max-width: 900px;
  margin: 0 auto;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.45;
}

/* ---------- En-tête ---------- */
.fes-entete { text-align: center; margin-bottom: 1.2em; }
.fes-titre { margin: 0; font-size: 1.5em; }
.fes-sous-titre { margin: .2em 0 .6em; font-size: 1.15em; font-weight: 700; }
.fes-objectif { text-align: left; margin: .5em 0; }

/* ---------- Identité ---------- */
.fes-identite { margin-bottom: 1em; }
.fes-champ { margin: .6em 0; }
.fes-champ label { display: inline-block; margin-right: .5em; }
.fes-champ input[type="text"],
.fes-champ input[type="date"] {
  border: none;
  border-bottom: 1px solid #333;
  border-radius: 0;
  padding: .2em .3em;
  min-width: 220px;
  background: transparent;
}
.fes-champ textarea {
  display: block;
  width: 100%;
  border: 1px solid #999;
  padding: .5em;
  margin-top: .3em;
  box-sizing: border-box;
}
.fes-type { margin-left: 1.2em; }
.fes-type label { margin-right: 1em; font-weight: normal; }

/* ---------- Mode d'emploi (encadré) ---------- */
.fes-mode-emploi {
  border: 1.5px solid #333;
  padding: .8em 1em;
  margin: 1em 0 1.5em;
  background: #fafafa;
}
.fes-mode-emploi ul { margin: .4em 0 0 1.2em; padding: 0; list-style: none; }
.fes-mode-emploi li { margin: .25em 0; }
.fes-sym { font-size: .8em; vertical-align: middle; }
.fes-etoile { color: #b8860b; font-size: 1em; }

/* ---------- Blocs & tableaux ---------- */
.fes-bloc { margin: 1.6em 0; }
.fes-bloc-titre {
  font-size: 1.05em;
  font-weight: 700;
  border-bottom: 2px solid #333;
  padding-bottom: .25em;
  margin: 0 0 .6em;
}
.fes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95em;
}
.fes-table th, .fes-table td {
  border: 1px solid #555;
  padding: .45em .55em;
  vertical-align: middle;
}
.fes-table thead th { background: #efefef; text-align: center; }
.fes-col-comp { width: 44%; text-align: left; }
.fes-col-choix { width: 8%; text-align: center; }
.fes-col-notes { width: 32%; }
.fes-col-notes input[type="text"] {
  width: 100%;
  border: none;
  border-bottom: 1px dotted #999;
  border-radius: 0;
  background: transparent;
  padding: .15em .2em;
  box-sizing: border-box;
}

/* Cases à cocher stylées (radio par ligne) */
.fes-case { display: inline-block; cursor: pointer; }
.fes-case input { position: absolute; opacity: 0; width: 0; height: 0; }
.fes-case-visuel {
  display: inline-block;
  width: 1.1em; height: 1.1em;
  border: 1.5px solid #333;
  background: #fff;
  vertical-align: middle;
  position: relative;
}
.fes-case input:checked + .fes-case-visuel { background: #1a1a1a; }
.fes-case input:checked + .fes-case-visuel::after {
  content: "✓";
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85em;
}
.fes-case input:focus-visible + .fes-case-visuel { outline: 2px solid #2271b1; outline-offset: 2px; }

/* ---------- Bilan ---------- */
.fes-bilan {
  border: 1.5px solid #333;
  padding: .8em 1em;
  margin: 1.8em 0 1em;
}
.fes-bilan .fes-bloc-titre { border-bottom: none; margin-bottom: .4em; }
.fes-aider { font-weight: normal; display: flex; gap: .5em; align-items: flex-start; }
.fes-aider input { margin-top: .3em; }

/* ---------- Actions & message ---------- */
.fes-actions { text-align: center; margin: 1.5em 0 .5em; }
.fes-btn {
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: .7em 2em;
  font-size: 1.05em;
  cursor: pointer;
  border-radius: 4px;
}
.fes-btn:hover { background: #333; }
.fes-btn[disabled] { opacity: .6; cursor: wait; }
.fes-message { text-align: center; font-weight: 700; min-height: 1.4em; }
.fes-message.fes-ok { color: #1a7a2e; }
.fes-message.fes-erreur { color: #b32d2e; }
.fes-ligne-incomplete { outline: 2px solid #b32d2e; outline-offset: -2px; }

/* ---------- Restitution (lecture) ---------- */
.fes-fiche-lecture { background: #fff; padding: 1.5em; }
.fes-valeur {
  border-bottom: 1px solid #333;
  padding: 0 .8em .1em;
  font-weight: 700;
}
.fes-valeur-longue { display: block; margin-top: .2em; min-height: 1.4em; }
.fes-coche { font-size: 1.15em; margin: 0 .15em 0 .6em; }
.fes-lecture-case { font-size: 1.15em; }
.fes-lecture-case.fes-cochee { background: #eef6ee; font-weight: 700; }

.fes-signatures {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
}
.fes-signatures td { border: 1px solid #555; padding: .5em; width: 50%; }
.fes-signature-espace td { height: 70px; }

/* ---------- Impression ---------- */
@media print {
  body * { visibility: hidden; }
  .fes-fiche-lecture, .fes-fiche-lecture * { visibility: visible; }
  .fes-fiche-lecture { position: absolute; inset: 0; width: 100%; padding: 0; }
  #adminmenumain, #wpadminbar, .notice, .button { display: none !important; }
  .fes-bloc { break-inside: avoid; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .fes-table { font-size: .85em; }
  .fes-table th, .fes-table td { padding: .3em .3em; }
  .fes-type { display: block; margin: .4em 0 0; }
}

/* ---------- Éditeur de modèles (admin) ---------- */
#fes-editeur { max-width: 900px; }
.fes-ed-champ { display: flex; align-items: flex-start; gap: .8em; margin: .6em 0; }
.fes-ed-label { min-width: 220px; font-weight: 700; padding-top: .35em; }
.fes-ed-bloc {
  border: 1px solid #c3c4c7;
  background: #fff;
  padding: .8em 1em;
  margin: 1em 0;
  border-radius: 4px;
}
.fes-ed-bloc-entete { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5em; }
.fes-ed-bloc-titre { font-weight: 700; margin-bottom: .5em; }
.fes-ed-item { display: flex; align-items: center; gap: .4em; margin: .35em 0; }
.fes-ed-num { min-width: 1.6em; text-align: right; color: #555; }
.fes-ed-mini { padding: 0 .5em !important; min-height: 26px !important; line-height: 24px !important; }
.fes-ed-actions { display: flex; gap: .3em; }

/* ---------- Graphiques progression ---------- */
.fes-graph {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  margin: .5em 0 1.5em;
}
