#ophys-focus-widget-root { position: relative; z-index: 4200; }

.ophys-focus-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 4200;
  display: flex; align-items: center; gap: 10px;
  border: 2px solid rgba(127, 216, 198, .55);
  background: linear-gradient(135deg, #1c3d3a, #14262b);
  color: #eafff7; border-radius: 999px; padding: 16px 26px 16px 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 6px rgba(127, 216, 198, .08);
  cursor: pointer; font-weight: 900; font-size: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
  animation: ophysFocusFabGlow 3.6s ease-in-out infinite;
}
.ophys-focus-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 8px rgba(127, 216, 198, .14); }
.ophys-focus-fab-icon { font-size: 26px; }
@keyframes ophysFocusFabGlow {
  0%, 100% { box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 6px rgba(127, 216, 198, .08); }
  50% { box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 12px rgba(127, 216, 198, .16); }
}


.ophys-focus-overlay {
  position: fixed; inset: 0; z-index: 4300;
  background: rgba(4, 10, 12, .82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ophys-focus-card {
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(165deg, #10262a, #0a1618);
  border: 1px solid rgba(120, 200, 190, .25); border-radius: 22px;
  padding: 26px; color: #eafff7; position: relative;
}

/* Panneau ancré (session active) : ne bloque jamais le reste du site —
   l'élève doit pouvoir continuer à consulter la théorie et les QCM
   pendant que le minuteur tourne. */
.ophys-focus-dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 4200;
  width: min(320px, calc(100vw - 40px));
  background: linear-gradient(165deg, #10262a, #0a1618);
  border: 1px solid rgba(120, 200, 190, .35); border-radius: 22px;
  padding: 20px; color: #eafff7;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.ophys-focus-dock .ophys-focus-session { padding-top: 0; }
.ophys-focus-dock .ophys-focus-timer-ring { width: 130px; height: 130px; margin: 6px 0 12px; }
.ophys-focus-dock .ophys-focus-timer-value { font-size: 28px; }
.ophys-focus-dock .ophys-focus-break h2 { font-size: 30px; margin: 4px 0 10px; }
.ophys-focus-dock .ophys-focus-session-title { font-size: 12px; }
.ophys-focus-dock .ophys-focus-current-step { font-size: 13px; margin-bottom: 10px; }
.ophys-focus-dock .ophys-focus-session-actions { flex-direction: column; width: 100%; }
.ophys-focus-dock .ophys-focus-session-actions button { width: 100%; }
.ophys-focus-dock .ophys-focus-movement-tip { font-size: 13px; }
.ophys-focus-dock .ophys-focus-close-session { top: 10px; right: 10px; }
.ophys-focus-dock .ophys-focus-braindump { margin-top: 14px; }

.ophys-focus-head { position: relative; margin-bottom: 6px; padding-right: 30px; }
.ophys-focus-eyebrow { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #7fd8c6; font-weight: 800; margin-bottom: 6px; }
.ophys-focus-head h2 { margin: 0 0 8px; font-size: 24px; font-weight: 850; line-height: 1.25; }
.ophys-focus-sub { margin: 0 0 18px; font-size: 13.5px; color: #b7d8d1; line-height: 1.5; }
.ophys-focus-close {
  position: absolute; top: -4px; right: -6px; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #eafff7;
  font-size: 18px; cursor: pointer; display: grid; place-items: center;
}

.ophys-focus-body { display: grid; gap: 12px; margin-bottom: 20px; }
.ophys-focus-label input,
.ophys-focus-step-row input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.25); color: #eafff7; font-size: 15px; font-weight: 600;
}
.ophys-focus-mini-label { margin: 6px 0 2px; font-size: 12.5px; color: #9fc9c0; font-weight: 700; }
.ophys-focus-steps-list { display: grid; gap: 8px; }
.ophys-focus-step-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; }
.ophys-focus-step-row > span { color: #7fd8c6; font-weight: 800; font-size: 13px; }
.ophys-focus-step-remove {
  width: 28px; height: 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: transparent; color: #b7d8d1; cursor: pointer; font-size: 15px;
}
.ophys-focus-add-step {
  align-self: start; border: 1px dashed rgba(120,200,190,.4); background: transparent; color: #7fd8c6;
  border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; text-align: left;
}

.ophys-focus-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.ophys-focus-preset-card {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); border-radius: 14px;
  padding: 14px 10px; color: #eafff7; cursor: pointer; display: grid; gap: 6px; text-align: center;
}
.ophys-focus-preset-card strong { font-size: 17px; font-weight: 900; }
.ophys-focus-preset-card span { font-size: 11px; color: #9fc9c0; }
.ophys-focus-preset-card.is-active { border-color: #7fd8c6; background: rgba(127,216,198,.14); }

.ophys-focus-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ophys-focus-btn-primary, .ophys-focus-btn-secondary, .ophys-focus-btn-ghost {
  border-radius: 999px; min-height: 46px; padding: 0 20px; font-weight: 800; font-size: 14px; cursor: pointer; border: 0;
}
.ophys-focus-btn-primary { background: linear-gradient(135deg, #4fc9ae, #7fd8c6); color: #06201c; }
.ophys-focus-btn-secondary { background: rgba(255,255,255,.08); color: #eafff7; border: 1px solid rgba(255,255,255,.16); }
.ophys-focus-btn-ghost { background: transparent; color: #b7d8d1; border: 1px solid rgba(255,255,255,.16); }

/* ---------- Session plein écran (distraction minimale) ---------- */
.ophys-focus-session { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 12px; }
.ophys-focus-session-title { font-size: 13px; color: #9fc9c0; margin: 0 0 4px; font-weight: 700; }
.ophys-focus-current-step { font-size: 15px; color: #eafff7; margin: 0 0 18px; font-weight: 650; }
.ophys-focus-close-session { position: absolute; top: 14px; right: 14px; }

.ophys-focus-timer-ring {
  --pct: 100;
  width: 190px; height: 190px; border-radius: 999px; margin: 10px 0 18px;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(#7fd8c6 calc(var(--pct) * 1%), rgba(255,255,255,.08) 0);
  transition: background .9s linear;
}
.ophys-focus-timer-ring::before {
  content: ""; position: absolute; inset: 10px; border-radius: 999px; background: #0a1618;
}
.ophys-focus-timer-value { position: relative; font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; color: #eafff7; }

.ophys-focus-blocks-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.ophys-focus-blocks-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.16); }
.ophys-focus-blocks-dots span.done { background: #7fd8c6; }
.ophys-focus-blocks-dots span.active { background: rgba(127,216,198,.5); }

.ophys-focus-session-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.ophys-focus-braindump {
  margin-top: 20px; padding: 16px; border-radius: 14px; background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12); text-align: left; width: 100%;
}
.ophys-focus-braindump p { margin: 0 0 8px; font-size: 13px; color: #b7d8d1; }
.ophys-focus-braindump textarea {
  width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.3);
  color: #eafff7; padding: 10px; font-size: 14px; resize: vertical;
}
.ophys-focus-braindump-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.ophys-focus-break h2 { font-size: 40px; font-weight: 900; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.ophys-focus-movement-tip { font-size: 15px; color: #eafff7; max-width: 320px; margin: 0 0 6px; line-height: 1.5; }

.ophys-focus-summary-stats { display: flex; justify-content: center; gap: 32px; margin: 6px 0 14px; }
.ophys-focus-summary-stats strong { display: block; font-size: 26px; font-weight: 900; color: #7fd8c6; }
.ophys-focus-summary-stats span { display: block; font-size: 11px; color: #9fc9c0; text-transform: uppercase; letter-spacing: .05em; }
.ophys-focus-encouragement { text-align: center; font-size: 14.5px; color: #eafff7; font-style: italic; margin: 0 0 10px; }
.ophys-focus-notes-recap ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: #b7d8d1; }

@media (prefers-reduced-motion: reduce) {
  .ophys-focus-fab, .ophys-focus-timer-ring { transition: none; animation: none; }
}

@media (max-width: 520px) {
  .ophys-focus-fab-label { display: none; }
  .ophys-focus-fab { padding: 12px; }
  .ophys-focus-preset-grid { grid-template-columns: 1fr; }
  .ophys-focus-timer-ring { width: 160px; height: 160px; }
  .ophys-focus-timer-value { font-size: 32px; }
}
