.relie-widget {
  font-family: Arial, system-ui, sans-serif;
  margin: 14px 0;
}

.relie-stage {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 0;
  padding: 18px;
  border: 1px solid #d8e1ec;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.relie-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.relie-col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.relie-left,
.relie-right {
  width: 42%;
}

.relie-item {
  padding: 10px 12px;
  border: 2px solid #cfd9e6;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  user-select: none;
  text-transform: none;
  font-family: Arial, system-ui, sans-serif;
  color: #0f4c5c;
  font-weight: normal;
}

.relie-item:hover {
  filter: brightness(0.95);
  background: #fff;
  border: 3px solid #cfd9e6;
}

.relie-item.is-selected {
  outline: 2px solid #2b7bbb !important;
}

.relie-item.is-linked {
  outline: 2px solid #8ecaff;
}

.relie-item.is-ok {
  border-color: #1aa34a;
  background: #eef9f1;
  outline: none !important;
}

.relie-item.is-ko {
  border-color: #d64545;
  background: #fff1f1;
  outline: none !important;
}

.relie-item.is-solution {
  border: 2px dashed #ffb913 !important;
  background: #fff5bf !important;
  color: #6a4d08 !important;
  outline: none !important;
}

.relie-item.is-missed {
  border: 2px dashed #d64545 !important;
  border-radius: 3px !important;
  background: transparent !important;
}

.relie-item.is-incomplete {
  border: 2px dashed #1aa34a !important;
  background: #eef9f1 !important;
  outline: none;
}

.relie-line {
  stroke: #2b7bbb;
  stroke-width: 3;
  cursor: pointer;
  pointer-events: stroke;
}

.relie-line.is-ok {
  stroke: #1f9d55;
}

.relie-line.is-ko {
  stroke: #d64545;
}

.relie-line.is-solution {
  stroke: #ffb913;
  stroke-width: 3;
}

.relie-line.is-incomplete {
  stroke: #1aa34a;
  stroke-width: 3;
  stroke-dasharray: 6 4;
}

.relie-widget.is-locked .relie-item {
  pointer-events: none;
}

.relie-actions {
  padding-top: 12px;
  border-top: 1px solid #e7eef6;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.relie-widget .relie-actions button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #0f6d86;
  background: #147e99;
  color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  font-size: 12pt;
  font-weight: normal;
  line-height: 1.1;
  font-family: Arial, system-ui, sans-serif;
}

.relie-widget .relie-actions button:hover {
  filter: brightness(0.95);
}

.relie-widget .relie-actions .relie-solution:hover,
.relie-widget .relie-actions .relie-solution.is-active {
  background: rgba(255, 245, 191, 0.54);
  color: #6a4d08;
  border: 2px solid #ffb913;
}

.relie-widget .relie-actions .relie-retry {
  background: #f0f3f6;
  color: #0f4c5c;
  border-color: #cfd9e6;
}

.relie-widget .relie-score {
  margin-left: auto;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: #0f4c5c;
  font-family: Arial, system-ui, sans-serif;
  font-size: 12pt;
}

/* IMAGE */
.relie-image-stage {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
}

.relie-image-stage .relie-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.relie-image-stage .relie-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.relie-image-stage .relie-point {
  position: absolute;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #2b7bbb;
  background: #fff;
  cursor: pointer;
}

.relie-point::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #2b7bbb;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.8;
}

.relie-image-stage .relie-point.is-ok {
  border-color: #1aa34a;
  background: #eef9f1;
}

.relie-image-stage .relie-point.is-ko {
  border-color: #d64545;
  background: #fff1f1;
}

.relie-image-stage .relie-point.is-missed {
  border: 3px dashed #d64545 !important;
  background: transparent !important;
}

.relie-image-stage .relie-point.is-solution {
  border: 3px dashed #ffb913 !important;
  /*background: #fff5bf !important;*/
  background: transparent !important;*
}

.relie-image-stage .relie-point.is-incomplete {
  border: 2px dashed #1aa34a !important;
  background: #eef9f1 !important;
}

.relie-node {
  position: absolute;
  transform: translate(-50%, -50%);
}

.relie-label {
  position: absolute;
  left: 35px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #0f4c5c;
}

.relie-label-img {
  width: 48px;
  height: auto;
  left: 35px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
  max-width: none !important;
}

/* MIXED */
.relie-widget[data-relie-mode="mixed"] {
  position: relative;
  display: grid;
  grid-template-columns: 200px minmax(320px, 520px);
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
}

.relie-widget[data-relie-mode="mixed"] > .relie-left {
  position: relative;
  z-index: 3;
  width: auto !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relie-widget[data-relie-mode="mixed"] .relie-item.is-selected {
  outline: 3px solid rgba(43, 123, 187, 0.35) !important;
  border-color: #2b7bbb !important;
  background: #eef7ff !important;
}

.relie-widget[data-relie-mode="mixed"] > .relie-image-zone {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 520px;
}

.relie-widget[data-relie-mode="mixed"] .relie-image-zone img {
  display: block;
  width: 100%;
  height: auto;
}

.relie-widget[data-relie-mode="mixed"] .relie-image-zone .relie-point {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #2b7bbb;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.relie-widget[data-relie-mode="mixed"] .relie-mixed-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.relie-widget[data-relie-mode="mixed"] > .relie-actions {
  position: relative;
  z-index: 7;
  grid-column: 1 / -1;
}

.relie-widget[data-relie-mode="mixed"] .relie-point.is-ok {
  border-color: #1aa34a !important;
  background: #eef9f1 !important;
}

.relie-widget[data-relie-mode="mixed"] .relie-point.is-ko {
  border-color: #d64545 !important;
  background: #fff1f1 !important;
}

.relie-widget[data-relie-mode="mixed"] .relie-point.is-solution {
  border: 3px dashed #ffb913 !important;
  background: #fff5bf !important;
}

.relie-widget[data-relie-mode="mixed"] .relie-point.is-missed {
  border: 3px dashed #d64545 !important;
  background: transparent !important;
}

.relie-widget[data-relie-mode="mixed"] .relie-point.is-incomplete {
  border: 2px dashed #1aa34a !important;
  background: #eef9f1 !important;
}

.relie-stage,
.relie-image-zone {
  touch-action: none;
}

.relie-line.is-preview {
  stroke: #2b7bbb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 6 4;
  opacity: 0.75;
  pointer-events: none;
}

/* =====================================================
   RELIE — FULLSCREEN
===================================================== */

.relie-stage {
  position: relative;
}

.relie-fullscreen {
  position:absolute;
  top:5px;
  right:5px;
  z-index:5;
  width:36px;
  height:36px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(15,109,134,.25);
  border-radius:10px;
  background:rgba(255,255,255,.85);
  color:#0f4c5c;
  cursor:pointer;
  font:inherit;
  line-height:1;
  appearance:none;
  -webkit-appearance:none;
  box-shadow:0 1px 4px rgba(0,0,0,.08);
}

.relie-fullscreen:hover {
  background: rgba(255,255,255,.98);
  border-color: rgba(15,109,134,.45);
}

/* Le widget RELIE en plein écran */
.relie-widget.relie-is-fullscreen {
  background: white;
  padding: 16px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* Le stage prend la place disponible */
.relie-widget.relie-is-fullscreen .relie-stage {
  max-width: none;
  width: 100%;
}

/* Images bien contenues */
.relie-widget.relie-is-fullscreen .relie-bg {
  max-width: 100%;
  height: auto;
}