/* ===== AUTH SCREENS (login / setpass / forgot) ===== */
.ws-portal-auth {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ws-portal-auth-box {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 25px 60px rgba(2, 6, 23, .12);
  text-align: center;
}
.ws-portal-brand-tag {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, #eab308, #facc15);
  color: #0b1220;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ws-portal-auth-box h2 {
  font-size: 26px;
  margin: 14px 0 18px;
  color: #0f172a;
}
.ws-portal-auth-box h3 {
  font-size: 18px;
  margin: 0 0 10px;
  color: #0f172a;
}
.ws-portal-auth-box p {
  margin: 0 0 18px;
  color: #475569;
  text-align: left;
  font-size: 14px;
}
.ws-portal-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.ws-portal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #334155;
}
.ws-portal-form input[type=email],
.ws-portal-form input[type=password],
.ws-portal-form input[type=text] {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
.ws-portal-form input:focus {
  outline: none;
  border-color: #eab308;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, .15);
}
.ws-portal-form button[type=submit] {
  padding: 14px;
  background: linear-gradient(135deg, #eab308, #facc15);
  color: #0b1220;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.ws-portal-form button[type=submit]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 179, 8, .45);
}
.ws-portal-form button[type=submit]:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.ws-portal-form-msg {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  min-height: 18px;
}
.ws-portal-form-msg.ok { color: #16a34a; }
.ws-portal-form-msg.err { color: #b91c1c; }
.ws-portal-link {
  text-align: center !important;
  margin-top: 16px !important;
  font-size: 13px;
}
.ws-portal-link a { color: #2563eb; text-decoration: none; }
.ws-portal-link a:hover { text-decoration: underline; }
.ws-portal-error {
  text-align: center !important;
  color: #b91c1c;
  background: #fee2e2;
  padding: 12px;
  border-radius: 10px;
}
.ws-portal-lang-switch {
  margin-top: 20px !important;
  text-align: center !important;
  font-size: 12px;
}
.ws-portal-lang-switch a {
  color: #64748b;
  text-decoration: none;
}

/* ===== TOPBAR (logout + lang) on authenticated portal ===== */
.ws-portal-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  gap: 8px;
}
.ws-portal-lang {
  display: flex;
  gap: 8px;
}
.ws-portal-lang-btn,
.ws-portal-logout {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  transition: background .15s, color .15s;
}
.ws-portal-lang-btn:hover { background: #f1f5f9; }
.ws-portal-logout:hover { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.ws-portal {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, .08);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  line-height: 1.55;
}
.ws-portal-msg {
  max-width: 600px;
  margin: 80px auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .08);
}
.ws-portal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.ws-portal-brand {
  display: inline-block;
  padding: 6px 12px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ws-portal-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 6px;
  letter-spacing: -.03em;
  color: #0f172a;
}
.ws-portal-sub { color: #64748b; margin: 0; }
.ws-portal-engagement {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
}
.ws-portal-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #92400e;
}
.ws-portal-engagement strong {
  font-size: 22px;
  color: #92400e;
}
.ws-portal-engagement span:not(.ws-portal-tag) {
  color: #78350f;
  font-weight: 700;
}
.ws-portal-engagement small {
  color: #92400e;
  opacity: .7;
  font-size: 12px;
  margin-top: 4px;
}

.ws-portal h2 {
  font-size: 22px;
  margin: 30px 0 14px;
  color: #0f172a;
  letter-spacing: -.02em;
}

.ws-portal-budget {
  background: linear-gradient(180deg, #dbeafe, #eff6ff);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}
.ws-portal-bar {
  height: 14px;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
  border: 1px solid #bfdbfe;
}
.ws-portal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #eab308, #facc15);
  transition: width .3s;
}
.ws-portal-bar-info {
  display: flex;
  justify-content: space-between;
  color: #1e40af;
  font-size: 14px;
}
.ws-portal-bar-info strong { font-size: 16px; }

.ws-portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.ws-portal-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
}
.ws-portal-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #0f172a;
}
.ws-portal-card p {
  margin: 4px 0;
  font-size: 14px;
  color: #475569;
}
.ws-portal-desc { color: #64748b; }

.ws-portal-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  background: #e0e7ff;
  color: #3730a3;
  margin: 4px 0;
}
.ws-portal-pill-planned { background: #f3f4f6; color: #374151; }
.ws-portal-pill-in_progress { background: #dbeafe; color: #1e40af; }
.ws-portal-pill-delivered { background: #dcfce7; color: #166534; }
.ws-portal-pill-billed { background: #fed7aa; color: #9a3412; }
.ws-portal-pill-todo { background: #f3f4f6; color: #374151; }
.ws-portal-pill-doing { background: #dbeafe; color: #1e40af; }
.ws-portal-pill-waiting { background: #fed7aa; color: #9a3412; }
.ws-portal-pill-done { background: #dcfce7; color: #166534; }
.ws-portal-pill-brief, .ws-portal-pill-quote { background: #fef3c7; color: #92400e; }
.ws-portal-pill-review { background: #e9d5ff; color: #6b21a8; }
.ws-portal-pill-archived { background: #f3f4f6; color: #6b7280; }

.ws-portal-month {
  margin-bottom: 18px;
  background: #f8fafc;
  border-left: 4px solid #eab308;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
}
.ws-portal-month h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #0f172a;
  text-transform: capitalize;
}
.ws-portal-month h3 small {
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
  margin-left: 8px;
}
.ws-portal-month ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ws-portal-month li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.ws-portal-month li:last-child { border-bottom: 0; }
.ws-portal-item-main { flex: 1 1 280px; }
.ws-portal-item-main strong { display: block; color: #0f172a; margin-bottom: 4px; }
.ws-portal-item-main p { margin: 0; font-size: 13px; color: #64748b; }
.ws-portal-item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ws-portal-amount {
  background: #fef3c7;
  color: #92400e;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
}

.ws-portal-tasks ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ws-portal-tasks li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ws-portal-tasks li strong { color: #0f172a; }
.ws-portal-tasks li small { color: #64748b; }

.ws-portal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* Activity feed */
.ws-portal-activity ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ws-portal-activity li {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.ws-portal-activity-icon {
  font-size: 18px;
}
.ws-portal-activity-date {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
  min-width: 60px;
}

/* Global progress */
.ws-portal-progress {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}
.ws-portal-progress .ws-portal-bar-fill {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.ws-portal-progress .ws-portal-bar-info { color: #166534; }

/* Tasks grouped */
.ws-portal-task-group {
  margin: 18px 0;
  padding: 16px 18px;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #cbd5e1;
}
.ws-portal-task-group.ws-portal-task-todo { border-left-color: #6b7280; }
.ws-portal-task-group.ws-portal-task-doing { border-left-color: #2563eb; }
.ws-portal-task-group.ws-portal-task-waiting { border-left-color: #ea580c; }
.ws-portal-task-group.ws-portal-task-done { border-left-color: #16a34a; }
.ws-portal-task-group h3 {
  margin: 0 0 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-portal-task-group h3 small { color: #94a3b8; font-weight: 600; }
.ws-portal-task-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ws-portal-task {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
}
.ws-portal-task-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ws-portal-task-head strong { color: #0f172a; flex: 1 1 220px; }
.ws-portal-task-head small { color: #64748b; }
.ws-portal-task-desc {
  margin-top: 6px;
  font-size: 14px;
  color: #475569;
}
.ws-portal-task-actions {
  margin-top: 8px;
}
.ws-portal-priority {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.ws-portal-priority-high { background: #fef3c7; color: #92400e; }
.ws-portal-priority-urgent { background: #fee2e2; color: #991b1b; }
.ws-portal-priority-low { background: #f3f4f6; color: #6b7280; }

/* Prestation feedback */
.ws-portal-prest-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ws-portal-prest-actions button {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: transform .15s, box-shadow .15s;
}
.ws-portal-btn-approve {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}
.ws-portal-btn-changes {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a !important;
}
.ws-portal-btn-comment {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1 !important;
}
.ws-portal-prest-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.ws-portal-approved {
  color: #166534;
  background: #dcfce7;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 6px !important;
  font-size: 13px;
  display: inline-block;
}
.ws-portal-changes {
  color: #991b1b;
  background: #fee2e2;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 6px !important;
  font-size: 13px;
  display: inline-block;
}
.ws-portal-prest-approved {
  opacity: .85;
}

/* Comments */
.ws-portal-comments {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.ws-portal-comments-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.ws-portal-comments-list li {
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid #cbd5e1;
}
.ws-portal-comment-admin { border-left-color: #eab308 !important; background: #fffbeb !important; }
.ws-portal-comment-client { border-left-color: #2563eb !important; background: #eff6ff !important; }
.ws-portal-comments-list strong { color: #0f172a; }
.ws-portal-comments-list small { color: #94a3b8; margin-left: 6px; font-size: 11px; }
.ws-portal-comment-body { margin-top: 4px; font-size: 14px; color: #334155; }
.ws-portal-comment-body p { margin: 4px 0; }
.ws-portal-no-comments { color: #94a3b8; font-size: 13px; margin: 0 0 12px; }
.ws-portal-comment-new {
  animation: ws-portal-flash 1s;
}
@keyframes ws-portal-flash {
  0% { background: #dcfce7 !important; }
  100% { background: #eff6ff !important; }
}

.ws-portal-comment-form,
.ws-portal-changes-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ws-portal-comment-form textarea,
.ws-portal-changes-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}
.ws-portal-comment-form button,
.ws-portal-changes-form button {
  align-self: flex-start;
  padding: 10px 18px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}
.ws-portal-changes-form button {
  background: linear-gradient(135deg, #ea580c, #f97316);
}
.ws-portal-form-msg {
  font-size: 13px;
  font-weight: 700;
}
.ws-portal-changes-form {
  background: #fef3c7;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #fde68a;
}
.ws-portal-changes-form h4 {
  margin: 0 0 8px;
  color: #92400e;
}

@media (max-width: 700px) {
  .ws-portal { padding: 18px; margin: 10px; border-radius: 16px; }
  .ws-portal-header { flex-direction: column; }
  .ws-portal-engagement { width: 100%; }
  .ws-portal-prest-actions { flex-direction: column; }
  .ws-portal-prest-actions button { width: 100%; }
}

/* v1.6.1 — Detail under monthly budget gauge */
.ws-portal-budget-detail {
  text-align: center;
  margin: 8px 0 0;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}

/* ===== v1.6.5 — Production de contenu (vue client) ===== */
.ws-portal-content-prod {
  margin: 28px 0;
}
.ws-portal-content-prod > h2 {
  margin-bottom: 6px;
}
.ws-portal-content-prod-intro {
  color: rgba(255,255,255,0.85);
  margin: 0 0 18px;
  font-size: 14px;
  font-style: italic;
}

.ws-portal-page-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  color: #1d2327;
}
.ws-portal-page-card-head h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #1F4E78;
}
.ws-portal-page-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ws-portal-url-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 3px 8px;
  background: #f1f5f9;
  border-radius: 14px;
  color: #1F4E78;
  text-decoration: none;
  border: 1px solid #cbd5e1;
}
.ws-portal-url-pill:hover {
  background: #e0e7ff;
  text-decoration: none;
}

.ws-portal-page-card-progress {
  margin-bottom: 16px;
}
.ws-portal-page-card-progress .ws-portal-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.ws-portal-page-card-progress .ws-portal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.ws-portal-page-card-progress .ws-portal-bar-info {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 13px;
  color: #50575e;
}

.ws-portal-page-card h4 {
  font-size: 13px;
  margin: 14px 0 6px;
  color: #50575e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ws-portal-page-card h4 small {
  font-weight: 400;
  color: #9ca3af;
  text-transform: none;
  letter-spacing: 0;
}

.ws-portal-deriv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ws-portal-deriv-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.ws-portal-deriv-list li:last-child { border-bottom: none; }
.ws-portal-deriv-list li.ws-portal-deriv-recent {
  background: #f0fdf4;
  border-radius: 4px;
  border-bottom-color: transparent;
}

.ws-portal-deriv-check {
  color: #16a34a;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.ws-portal-deriv-clock {
  color: #b45309;
  font-size: 14px;
  text-align: center;
}
.ws-portal-deriv-label {
  color: #1d2327;
}
.ws-portal-deriv-label strong {
  color: #1F4E78;
  font-weight: 600;
  margin-right: 4px;
}
.ws-portal-deriv-lang {
  display: inline-block;
  padding: 1px 6px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}
.ws-portal-deriv-date {
  color: #50575e;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.ws-portal-deriv-pts {
  color: #16a34a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 60px;
  text-align: right;
}
.ws-portal-deriv-list-pending .ws-portal-deriv-pts {
  color: #b45309;
}

@media (max-width: 600px) {
  .ws-portal-deriv-list li {
    grid-template-columns: 22px 1fr auto;
    grid-template-areas: "check label pts" "check date  pts";
    row-gap: 2px;
  }
  .ws-portal-deriv-check, .ws-portal-deriv-clock { grid-area: check; }
  .ws-portal-deriv-label { grid-area: label; }
  .ws-portal-deriv-date  { grid-area: date; font-size: 11px; }
  .ws-portal-deriv-pts   { grid-area: pts; }
}

/* ===== v1.6.6 — Jauge "Total contrat" ===== */
.ws-portal-budget-total {
  margin-top: 14px;
  position: relative;
}
.ws-portal-budget-total h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.ws-portal-budget-total h2 small {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
}
.ws-portal-budget-total .ws-portal-bar-fill {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}
.ws-portal-budget-time {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.ws-portal-budget-time strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
