/* Onglet « 🕳 Diagnostic SPEED » (speed.js)
 * Charte Celesta-lab 2026 (charte/Celesta-lab_Charte_2026_AI.md, 14/11/2026) : Work Sans
 * (fichiers de l'appli terrain), anthracite #1A1819 pour les boutons et titres, couleurs
 * d'état sauge / ocre / Salagou / rouge logo, bleu ardoise, séparateurs #E7D8CB. Sauge et
 * ocre sont clairs : texte anthracite dessus. */
@font-face { font-family: 'Work Sans'; font-weight: 400; font-display: swap; src: url(terrain/polices/work-sans-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 600; font-display: swap; src: url(terrain/polices/work-sans-latin-600.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 700; font-display: swap; src: url(terrain/polices/work-sans-latin-700.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 800; font-display: swap; src: url(terrain/polices/work-sans-latin-800.woff2) format('woff2'); }
.sp-wrap, .spe-tr, .sp-loupe { font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #1A1819; }
.sp-wrap button, .sp-wrap input, .sp-wrap textarea, .sp-wrap select, .spe-tr button { font-family: inherit; }
.sp-profil h3 { font-weight: 800; letter-spacing: .01em; }
.sp-aide { font-size: .78rem; color: #6b6b6b; margin: 6px 0; }
.sp-aide a { color: #5B7B9A; }
.sp-erreur { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #F6DEDB; color: #C1443D; font-size: .85rem; }
.sp-qa { font-size: 1rem; margin: 14px 0 8px; }
.sp-profil { border: 1px solid #E7D8CB; border-radius: 12px; background: #F5F2EE; padding: 12px 16px; margin: 12px 0 18px; }
.sp-profil h3 { margin: 0 0 2px; font-size: 1.05rem; }
.sp-profil h4 { margin: 16px 0 6px; font-size: .9rem; color: #1A1819; border-bottom: 1px solid #E7D8CB; padding-bottom: 3px; }
.sp-texte { white-space: pre-wrap; font-size: .86rem; line-height: 1.45; margin: 4px 0 6px; }
.sp-vide { font-size: .8rem; color: #9a9a9a; font-style: italic; margin: 4px 0; }
.sp-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.sp-photo { margin: 0; width: 240px; cursor: zoom-in; }
.sp-img { position: relative; min-height: 80px; background: #EEE7DE; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.sp-img img { display: block; width: 100%; height: auto; }
.sp-traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sp-charge { font-size: .75rem; color: #8a8a8a; padding: 20px; }
.sp-photo figcaption { font-size: .7rem; color: #6b6b6b; margin-top: 3px; word-break: break-all; }
.sp-element { border-left: 4px solid #D4A574; background: #FBF7F2; border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.sp-element.limite { border-left-color: #5B7B9A; }
.sp-element-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; font-size: .88rem; }
.sp-etat { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #EEE; color: #6b6b6b; }
.sp-etat.rep { background: #C1443D; color: #fff; }
.sp-etat.ras { background: #8B9E7E; color: #1A1819; }
.sp-etat.vig { background: #E8A020; color: #1A1819; }
.sp-etat { display: inline-flex; align-items: center; gap: 5px; }
.sp-smiley { flex: none; }
.sp-repa { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .82rem; margin-top: 6px; }
.sp-repa span { display: inline-flex; align-items: center; gap: 5px; }
.sp-etat.urg { background: #FF1100; color: #fff; }
.sp-pictos { display: inline-flex; align-items: center; gap: 3px; }
.sp-pictos img { height: 26px; width: auto; }
.sp-pictos img.ver { height: 11px; }
.sp-appreciation { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: .88rem; }
.sp-risque { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #C1443D; color: #fff; margin-left: auto; margin-right: 6px; }
.sp-table { border-collapse: collapse; font-size: .8rem; min-width: 520px; }
.sp-table th, .sp-table td { text-align: left; padding: 5px 10px; border-bottom: 1px solid #E7D8CB; }
.sp-table tbody tr { cursor: pointer; }
.sp-table tbody tr:hover { background: #FBF3EA; }
.sp-loupe { position: fixed; inset: 0; z-index: 10000; background: rgba(26,24,25,.9); display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: zoom-out; padding: 20px; }
.sp-loupe-cadre { position: relative; max-width: 100%; max-height: calc(100% - 40px); }
.sp-loupe-cadre img { display: block; max-width: 92vw; max-height: 86vh; }
.sp-loupe-nom { color: #fff; font-size: .8rem; margin-top: 8px; }
.sp-attente { color: #9A6A1F; font-weight: 600; }
.sp-profil-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-suppr { border: 1px solid #E8A09C; background: #fff; color: #C1443D; border-radius: 8px; padding: 4px 10px; font-size: .78rem; cursor: pointer; }
.sp-suppr:hover { background: #F6DEDB; }
.sp-suppr:disabled { opacity: .5; cursor: default; }
.sp-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sp-pdf { border: 1px solid #1A1819; background: #1A1819; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: .78rem; cursor: pointer; }
.sp-pdf:hover { filter: brightness(1.08); }
.sp-pdf:disabled { opacity: .6; cursor: default; }
.sp-reaff { border: 1px solid #8A6A3B; background: #fff; color: #6B4F2A; border-radius: 8px; padding: 4px 10px; font-size: .78rem; cursor: pointer; }
.sp-reaff:hover { background: #F6EEE3; }
.sp-reaff:disabled { opacity: .6; cursor: default; }
.sp-demo { display: inline-block; font-size: .7rem; font-weight: 700; color: #6B4F2A; background: #F6EEE3; border: 1px solid #D8C3A5; border-radius: 99px; padding: 1px 7px; }
.sp-ligne-demo td { background: #FFFBF4; }
.sp-fermer { border: 1px solid #B9AC9D; background: #fff; color: #4a4038; border-radius: 8px; padding: 4px 12px; font-size: .8rem; cursor: pointer; }
.sp-fermer:hover { background: #F3ECE3; }
.sp-table-defile { overflow-x: auto; }
.sp-table td.sp-c, .sp-table th { text-align: center; }
.sp-table td:nth-child(2), .sp-table td:nth-child(4) { white-space: nowrap; }
.sp-table th:nth-child(5), .sp-table td:nth-child(5), .sp-table th:last-child, .sp-table td:last-child { text-align: left; }
.sp-table td.sp-c .sp-pictos img { height: 20px; }
.sp-table td.sp-c .sp-pictos img.ver { height: 8px; }
.sp-table input[type=checkbox] { cursor: pointer; width: 16px; height: 16px; }
.sp-modif { border: 1px solid #5B7B9A; background: #fff; color: #5B7B9A; border-radius: 8px; padding: 4px 10px; font-size: .78rem; cursor: pointer; }
.sp-modif:hover { background: #E7EDF2; }

/* Modification d'un profil (speed.js, editer) */
.spe { border-color: #5B7B9A; box-shadow: 0 0 0 2px rgba(91,123,154,.15); }
.spe textarea, .spe input[type=text], .spe input[type=number] { width: 100%; box-sizing: border-box; font: inherit; font-size: .86rem;
  border: 1px solid #D8C9B8; border-radius: 6px; padding: 6px 8px; background: #fff; }
.spe textarea { margin: 4px 0 6px; resize: vertical; }
.spe-titre { max-width: 420px; }
.spe-champ { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: #6b6b6b; margin: 4px 0; }
.spe-ligne { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.spe-ligne .spe-champ { flex: 1 1 140px; max-width: 220px; }
.spe-q { font-size: .8rem; font-weight: 700; margin: 10px 0 4px; }
.spe-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.spe-choix button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #D8C9B8; background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: .8rem; cursor: pointer; color: #1A1819; }
.spe-choix button span { display: inline-flex; }
.spe-choix button[aria-pressed="true"] { color: #fff; font-weight: 600; background: #1A1819; border-color: #1A1819; }
.spe-choix .spe-c-inutile[aria-pressed="true"], .spe-choix .spe-c-vert[aria-pressed="true"] { background: #8B9E7E; border-color: #8B9E7E; color: #1A1819; }
.spe-choix .spe-c-conseillee[aria-pressed="true"], .spe-choix .spe-c-jaune[aria-pressed="true"] { background: #E8A020; border-color: #E8A020; color: #1A1819; }
.spe-choix .spe-c-necessaire[aria-pressed="true"], .spe-choix .spe-c-rouge[aria-pressed="true"] { background: #C1443D; border-color: #C1443D; }
.spe-choix .spe-c-urgente[aria-pressed="true"] { background: #FF1100; border-color: #FF1100; }
.spe-choix .sp-pictos { background: #fff; border-radius: 5px; padding: 1px 3px; }
.spe-risque { border: 1.5px solid #D8C9B8; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: .8rem; cursor: pointer; }
.spe-risque[aria-pressed="true"] { background: #C1443D; border-color: #C1443D; color: #fff; font-weight: 600; }
.spe-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 6px 0; }
.spe-photo { position: relative; margin: 0; width: 180px; }
.spe-photo figcaption { font-size: .7rem; color: #6b6b6b; margin-top: 3px; word-break: break-all; }
.spe-tracer, .spe-retirer { position: absolute; top: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; font-size: .9rem; line-height: 28px; padding: 0; }
.spe-tracer { left: 4px; } .spe-retirer { right: 4px; }
.spe-ajout-photo { width: 120px; height: 90px; border: 1.5px dashed #1A1819; background: #F5F2EE; color: #1A1819; border-radius: 8px;
  cursor: pointer; font-size: .85rem; font-weight: 600; }
.spe-pied { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; padding-top: 10px; border-top: 1px solid #E7D8CB; }
.spe-pied .sp-aide { margin-right: auto; }
.spe-tr { position: fixed; inset: 0; z-index: 10001; background: #1A1819; display: flex; flex-direction: column; }
.spe-tr-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: #2A2728; }
.spe-tr-barre button { border: 1px solid #555; background: #333; color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: .82rem; }
.spe-tr-barre .spe-ok { background: #1A1819; border-color: #1A1819; font-weight: 600; }
.spe-tr-couleurs { display: inline-flex; gap: 6px; }
.spe-tr-couleurs button { width: 26px; height: 26px; border-radius: 50%; padding: 0; border: 2px solid #666; }
.spe-tr-couleurs button.choisie { border-color: #fff; box-shadow: 0 0 0 2px #1A1819; }
.spe-tr-scene { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px; }
.spe-tr-cadre { position: relative; }
.spe-tr-cadre img { display: block; }
.spe-tr-cadre canvas { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.spe-carte { height: 260px; border-radius: 8px; border: 1px solid #D8C9B8; margin: 4px 0 8px; background: #EEE7DE; }
