
.sgp-client-hub-login-wrapper {
    min-height: 0vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.sgp-client-hub-card {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 35px 30px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.sgp-client-hub-login-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}

.sgp-client-hub-card form {
    margin: 0;
}

.sgp-client-hub-card .sgp-client-hub-field {
    position: relative;
    margin-bottom: 18px;
}

.sgp-client-hub-card .sgp-client-hub-field input[type="text"],
.sgp-client-hub-card .sgp-client-hub-field input[type="email"],
.sgp-client-hub-card .sgp-client-hub-field input[type="password"] {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e5e8ee;
    padding: 10px 12px 10px 40px;
    box-sizing: border-box;
    font-size: 15px;
    color: #0f172a;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sgp-client-hub-card .sgp-client-hub-field input:focus {
    outline: none;
    border-color: #0b5be0;
    box-shadow: 0 0 0 3px rgba(11, 91, 224, 0.15);
    background: #ffffff;
}

.sgp-client-hub-card .sgp-client-hub-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sgp-client-hub-card .sgp-client-hub-icon svg {
    width: 18px;
    height: 18px;
}

.sgp-client-hub-card .sgp-client-hub-submit {
    width: 100%;
    border-radius: 999px;
    background: #0b5be0;
    border: none;
    padding: 11px 18px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.sgp-client-hub-card .sgp-client-hub-submit:hover {
    background: #0846ad;
}

.sgp-client-hub-card .sgp-client-hub-submit:active {
    transform: translateY(1px);
}

.sgp-client-hub-login-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #ffe6e6;
    border: 1px solid #ff9b9b;
    color: #a12121;
    font-size: 13px;
}

.sgp-client-hub-login-error > div + div {
    margin-top: 4px;
}

.sgp-client-hub-lostpassword {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
}

.sgp-client-hub-lostpassword a {
    color: #0b5be0;
    text-decoration: none;
}

.sgp-client-hub-lostpassword a:hover {
    text-decoration: underline;
}

.sgp-client-hub-dashboard-message,
.sgp-client-hub-dashboard-preview {
    padding: 20px;
    background: #f7f8fa;
    border: 1px solid #e3e6ec;
    border-radius: 10px;
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

.sgp-client-hub-login-button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 18px;
    background: #0b5be0;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.sgp-client-hub-login-button:hover {
    background: #0846ad;
}

.sgp-client-hub-dashboard {
    margin-bottom: 40px;
}

.sgp-client-hub-dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 25px;
}

.sgp-ch-project-badge--success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sgp-ch-project-badge__icon{
  flex:0 0 auto;
  margin-top:2px;
  font-weight:700;
  line-height:1;
}

.sgp-ch-project-badge__content strong{
  display:block;
  margin:0 0 2px 0;
  font-weight:800;
}

.sgp-ch-project-badge__content p{
  margin:0;
  line-height:1.35;
}

.sgp-ch-project-badge__close{
  flex:0 0 auto;
  margin-left:12px;
  text-decoration:none;
  color:#166534;
  opacity:.75;
  font-size:18px;
  line-height:1;
  padding:2px 6px;
  border-radius:6px;
}

.sgp-ch-project-badge__close:hover{
  opacity:1;
  background:rgba(22,101,52,.08);
}

.sgp-ch-meta-status {
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  border:1px solid transparent;
}

.sgp-ch-meta-status--approved {
  background:#ecfdf3;
  color:#166534;
  border-color:#bbf7d0;
}

.sgp-ch-meta-status--pending {
  background:#eff6ff;
  color:#1e40af;
  border-color:#bfdbfe;
}


.sgp-ch-meta-status--rejected {
  background:#fef2f2;
  color:#991b1b;
  border-color:#fecaca;
}

.sgp-ch-meta-status--deleted {
  background:#fef2f2;
  color:#991b1b;
  border-color:#fecaca;
}

.sgp-ch-meta-status--archived {
  background:#f3f4f6;
  color:#374151;
  border-color:#e5e7eb;
}

.sgp-ch-meta-status--sent {
  background:#fff7ed;
  color:#9a3412;
  border-color:#fed7aa;
}

.sgp-ch-step-status{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  border:1px solid transparent;
  line-height:1.2;
  white-space:nowrap;
}

.sgp-ch-step-status--done{
  background:#ecfdf3;
  color:#166534;
  border-color:#bbf7d0;
}

.sgp-ch-step-status--pending{
  background:#eff6ff;
  color:#1e40af;
  border-color:#bfdbfe;
}

.sgp-ch-step-status--in_progress{
  background:#fff7ed;
  color:#9a3412;
  border-color:#fed7aa;
}

.sgp-ch-step-status--unknown{
  background:#f3f4f6;
  color:#374151;
  border-color:#e5e7eb;
}

.sgp-client-hub-tile {
    border-radius: 16px;
    padding: 18px 18px 20px;
    background: var(--sgp-ch-bg-color, #f5f7fb);
    border: var(--sgp-ch-border-width, 1px) solid var(--sgp-ch-border-color, rgba(0, 0, 0, 0.06));
    box-shadow: none;
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease,
        border-color 0.2s ease;
}

.sgp-client-hub-tile-title {
    color: var(--sgp-ch-title-color, #111827);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.sgp-client-hub-tile-subtitle {
    font-size: 13px;
    opacity: 0.85;
}

.sgp-client-hub-tile:hover {
    background: var(--sgp-ch-bg-hover-color, #e8f0ff);
    border-color: var(--sgp-ch-border-color, rgba(0, 0, 0, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 10px var(--sgp-ch-shadow-blur, 18px) var(--sgp-ch-shadow-color, rgba(0, 0, 0, 0.18));
}

.sgp-client-hub-projects-list {
    margin-top: 20px;
}

.sgp-client-hub-section-title {
    font-size: 20px;
    margin-bottom: 14px;
}

.sgp-ch-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.sgp-ch-project-card {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
    text-decoration: none;
    color: #111827;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.sgp-ch-project-card:hover {
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
    transform: translateY(-2px);
}

.sgp-ch-project-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.sgp-ch-project-card__title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.sgp-ch-project-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #374151;
}

.sgp-ch-project-type {
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
}

.sgp-ch-project-date {
    padding: 4px 8px;
    background: #eef2ff;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
}

.sgp-ch-project-badge {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid transparent;
}

.sgp-ch-project-badge--danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.sgp-ch-project-badge--success{
  background:#ecfdf3;
  color:#166534;
  border:1px solid #bbf7d0;
  border-radius:8px;           /* <- léger */
  padding:12px 14px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  width:100%;
  box-sizing:border-box;
  margin-bottom: 12px;
}

.sgp-ch-project-badge--muted {
    background: #f3f4f6;
    color: #111827;
    border-color: #e5e7eb;
}

.sgp-ch-project-badge--info {
    background: #e0f2fe;
    color: #0b3b66;
    border-color: #bae6fd;
}

.sgp-ch-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #111827;
}

.sgp-ch-status-badge.is-progress {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

.sgp-ch-status-badge.is-hold {
    background: #fff7ed;
    color: #92400e;
    border-color: #fed7aa;
}

.sgp-ch-status-badge.is-completed {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.sgp-ch-status-badge.is-cancelled {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecdd3;
}

.sgp-ch-status-badge.is-draft,
.sgp-ch-status-badge.is-default {
    background: #f3f4f6;
    color: #111827;
    border-color: #e5e7eb;
}

.sgp-ch-project-view {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.04);
}

.sgp-ch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--sgp-ch-btn-radius, 10px);
    border: 1px solid var(--sgp-ch-btn-bg, #0b5be0);
    background: var(--sgp-ch-btn-bg, #0b5be0);
    color: var(--sgp-ch-btn-text, #ffffff);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.sgp-ch-btn:hover {
    background: var(--sgp-ch-btn-bg-hover, #0846ad);
    color: var(--sgp-ch-btn-text-hover, #ffffff);
    box-shadow: 0 8px 20px rgba(11, 91, 224, 0.2);
}

.sgp-ch-btn:active {
    transform: translateY(1px);
}

.sgp-ch-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.sgp-ch-project-back {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.sgp-ch-project-back--bottom {
    margin-top: 16px;
}

.sgp-ch-project-back-btn {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.sgp-ch-project-back-btn:hover {
    background: transparent;
    color: var(--sgp-dl-accent-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.sgp-ch-project-back-btn:active {
    transform: translateY(1px);
}

.sgp-ch-project-hero__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sgp-ch-project-hero__title {
    margin: 0;
    font-size: 20px;
}

.sgp-ch-project-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sgp-ch-project-hero__pill {
    padding: 6px 10px;
    border-radius: 10px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #111827;
}

.sgp-ch-section {
    margin-top: 18px;
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    opacity: 0;
    animation: sgp-ch-fade-in 0.35s ease forwards;
}

.sgp-ch-project-section--description .sgp-ch-project-description {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    line-height: 1.6;
}

.sgp-ch-project-description p {
    margin: 0 0 10px;
}

.sgp-ch-project-description p:last-child {
    margin-bottom: 0;
}

.sgp-ch-section__header h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.sgp-ch-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sgp-ch-section__icon {
    width: 20px;
    height: 20px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sgp-ch-section--messages {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
}

.sgp-ch-messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 12px;
}

.sgp-ch-message {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
}

.sgp-ch-message--client {
    border-color: #0b5be0;
    background: #eef2ff;
}

.sgp-ch-message--admin {
    background: #f9fafb;
}

.sgp-ch-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.sgp-ch-message-author {
    font-weight: 700;
    color: #0f172a;
}

.sgp-ch-message-body {
    font-size: 14px;
    line-height: 1.5;
}

.sgp-ch-message-body p {
    margin: 0 0 8px;
}

.sgp-ch-message-body p:last-child {
    margin-bottom: 0;
}

.sgp-ch-messages-empty {
    color: #6b7280;
    margin: 0 0 10px;
}

.sgp-ch-messages-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.sgp-ch-messages-form label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.sgp-ch-messages-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    min-height: 100px;
    box-sizing: border-box;
    font-size: 14px;
    resize: vertical;
}

.sgp-ch-messages-form textarea:focus {
    outline: none;
    border-color: #0b5be0;
    box-shadow: 0 0 0 3px rgba(11, 91, 224, 0.15);
}

.sgp-ch-messages-intro {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
}

.sgp-ch-section ul,
.sgp-ch-section ol {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 0;
    padding-left: 0;
}

.sgp-ch-step-list,
.sgp-ch-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 0;
    padding-left: 0;
    display: grid;
    gap: 14px;
}

.sgp-ch-step-list li,
.sgp-ch-checklist li,
.sgp-ch-step,
.sgp-ch-checklist__item {
    list-style: none;
    margin: 0;
    padding-left: 15px;
}

.sgp-ch-step,
.sgp-ch-checklist__item {
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.sgp-ch-step__title,
.sgp-ch-checklist__title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sgp-ch-step__meta,
.sgp-ch-checklist__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}

.sgp-ch-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: #0f172a;
}

.sgp-ch-checklist__files {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sgp-ch-checklist__file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 13px;
    text-decoration: none;
}

.sgp-ch-checklist__file-link:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.sgp-ch-checklist__actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sgp-ch-btn:focus-visible,
.sgp-ch-project-mini-link:focus-visible,
.sgp-client-hub-link:focus-visible,
.sgp-ch-checklist__file-link:focus-visible {
    outline: 2px solid #0b5be0;
    outline-offset: 2px;
    border-radius: 10px;
}

.sgp-ch-checklist__upload-btn {
    background: #0b5be0;
    border-color: #0b5be0;
}

.sgp-ch-checklist__upload-btn:hover {
    background: #0846ad;
    box-shadow: 0 8px 20px rgba(11, 91, 224, 0.2);
}

.sgp-ch-checklist__upload-feedback {
    font-size: 13px;
    color: #0b5be0;
}

.sgp-ch-project-view .sgp-ch-section:nth-of-type(1) { animation-delay: 0.05s; }
.sgp-ch-project-view .sgp-ch-section:nth-of-type(2) { animation-delay: 0.1s; }
.sgp-ch-project-view .sgp-ch-section:nth-of-type(3) { animation-delay: 0.15s; }
.sgp-ch-project-view .sgp-ch-section:nth-of-type(4) { animation-delay: 0.2s; }

.sgp-ch-checklist__tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sgp-ch-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.sgp-ch-tag--required {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.sgp-ch-tag--file-required {
    background: #e0f2fe;
    color: #0b3b66;
    border-color: #bae6fd;
}

.sgp-ch-checklist-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
    border: 1px solid transparent;
}

.sgp-ch-checklist-badge--validated {
    background: #e0f2e9;
    color: #0f5132;
    border-color: #badbcc;
}

.sgp-ch-checklist-badge--needs_changes {
    background: #fff4e5;
    color: #92400e;
    border-color: #fcd34d;
}
.sgp-ch-checklist-status--to-provide {
    background: #e0e7ff;
    color: #1d4ed8;
    border-color: #c7d2fe;
}

.sgp-ch-checklist-status--required {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.sgp-ch-checklist-status--provided {
    background: #e0f2fe;
    color: #1d4ed8;
    border-color: #bae6fd;
}

.sgp-ch-checklist-status--pending-validation {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.sgp-ch-checklist-status--validated {
    background: #dcfce7;
    color: #166534;
    border-color: #a7f3d0;
}

.sgp-ch-checklist-status--needs-changes {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecdd3;
}

.sgp-ch-checklist-validation-comment {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fffdf7;
}

.sgp-ch-checklist-validation-comment-label {
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.sgp-ch-checklist-validation-comment-body {
    font-size: 14px;
    color: #111827;
}

.sgp-ch-project-mini-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.sgp-client-hub-tile .sgp-ch-project-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sgp-ch-project-mini-list li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sgp-ch-project-mini-list li,
.sgp-ch-project-mini {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.sgp-ch-project-mini:hover {
    background: #f8fafc;
    box-shadow: 0 12px 22px rgba(17, 24, 39, 0.08);
    transform: translateY(-2px);
}

.sgp-ch-project-mini-link {
    display: block;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
    min-height: 44px;
    transition: transform 0.1s ease;
}

.sgp-ch-project-mini-link:active {
    transform: scale(0.99);
}

.sgp-ch-project-mini__header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sgp-ch-project-mini__icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sgp-ch-project-mini__title {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

.sgp-ch-project-mini__title:hover {
    text-decoration: underline;
}

.sgp-ch-project-mini__chevron {
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.sgp-ch-project-mini:hover .sgp-ch-project-mini__chevron {
    transform: translateX(3px);
}

.sgp-ch-project-mini__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 12px;
}

.sgp-ch-project-mini__progress {
    margin-top: 8px;
}

.sgp-ch-project-progress-block {
    margin: 12px 0 6px;
}

.sgp-ch-progress {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--sgp-ch-progress-bg, #eef2ff);
    border-radius: 999px;
    overflow: hidden;
}

.sgp-ch-progress__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--sgp-ch-progress-fill, #0b5be0);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.sgp-ch-progress__label {
    margin-top: 4px;
    font-size: 12px;
    color: #475569;
}

.sgp-ch-progress--low {
    --sgp-ch-progress-fill: var(--sgp-ch-progress-fill-low, #f59e0b);
    --sgp-ch-progress-bg: var(--sgp-ch-progress-bg-low, #fff4e5);
}

.sgp-ch-progress--medium {
    --sgp-ch-progress-fill: var(--sgp-ch-progress-fill-medium, #0b5be0);
    --sgp-ch-progress-bg: var(--sgp-ch-progress-bg-medium, #eef2ff);
}

.sgp-ch-progress--high {
    --sgp-ch-progress-fill: var(--sgp-ch-progress-fill-high, #10b981);
    --sgp-ch-progress-bg: var(--sgp-ch-progress-bg-high, #ecfdf3);
}

.sgp-ch-project-mini__deadline {
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sgp-ch-project-mini__deadline.is-late {
    color: #b91c1c;
    font-weight: 600;
}

.sgp-ch-timeline {
    position: relative;
    padding-left: 18px;
    margin: 12px 0 18px;
    border-left: 2px solid #e5e7eb;
}

.sgp-ch-timeline-item {
    position: relative;
    padding: 0 0 16px 14px;
}

.sgp-ch-timeline-item:last-child {
    padding-bottom: 0;
}

.sgp-ch-timeline-dot {
    position: absolute;
    top: 4px;
    left: -10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0b5be0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e5e7eb;
}

.sgp-ch-timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sgp-ch-timeline-title {
    font-weight: 600;
    color: #0f172a;
}

.sgp-ch-timeline-meta {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sgp-ch-timeline-item--done .sgp-ch-timeline-dot {
    background: #10b981;
}

.sgp-ch-timeline-item--in_progress .sgp-ch-timeline-dot {
    background: #0ea5e9;
}

.sgp-ch-timeline-item--pending .sgp-ch-timeline-dot {
    background: #f59e0b;
}

.sgp-ch-timeline-item--blocked .sgp-ch-timeline-dot {
    background: #ef4444;
}

.sgp-ch-timeline--directional {
    border-left-color: transparent;
    margin-top: 12px;
}

.sgp-ch-timeline-step-index {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #0b5be0;
    font-weight: 600;
    font-size: 12px;
}

.sgp-ch-timeline-item--current .sgp-ch-timeline-content {
    border: 1px solid #0b5be0;
    box-shadow: 0 10px 25px -12px rgba(11, 91, 224, 0.25);
}

.sgp-ch-timeline-item--start .sgp-ch-timeline-dot,
.sgp-ch-timeline-item--end .sgp-ch-timeline-dot {
    background: #0b5be0;
    border-color: #0b5be0;
    box-shadow: 0 0 0 2px rgba(11, 91, 224, 0.12);
}

.sgp-ch-steps-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
}

.sgp-ch-steps-progress__bar {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.sgp-ch-steps-progress__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0b5be0, #3b82f6);
}

.sgp-ch-steps-progress__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 600;
    color: #0f172a;
}

.sgp-ch-steps-progress__current {
    color: #1f2937;
    font-weight: 500;
}

.sgp-ch-steps-current {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f8fafc;
    margin: 12px 0;
    display: grid;
    gap: 4px;
}

.sgp-ch-steps-current__eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: #0b5be0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sgp-ch-steps-current__position {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.sgp-ch-steps-current__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.sgp-ch-steps-current__status {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.sgp-ch-steps-current__next-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-top: 8px;
}

.sgp-ch-steps-current__next {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.sgp-ch-steps-current__progress {
    margin-top: 8px;
}

.sgp-ch-steps-current__progress-track {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.sgp-ch-steps-current__progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0b5be0, #3b82f6);
}

.sgp-ch-meta-grid ul,
.sgp-ch-meta-list,
.sgp-ch-meta-list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sgp-ch-meta-list {
    display: grid;
    gap: 10px;
}

.sgp-ch-muted {
    color: #6b7280;
    font-size: 13px;
}

@media (max-width: 600px) {
    .sgp-client-hub-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .sgp-ch-project-mini__header,
    .sgp-ch-project-mini__meta {
        align-items: flex-start;
    }

    .sgp-ch-project-mini-link {
        padding: 12px;
    }

    .sgp-ch-step,
    .sgp-ch-checklist__item {
        padding: 14px 18px;
    }

    .sgp-ch-steps-progress__meta {
        flex-direction: column;
        gap: 2px;
        font-size: 13px;
    }

    .sgp-ch-timeline--directional .sgp-ch-timeline-content {
        padding: 10px;
    }

    .sgp-ch-timeline-title {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

@keyframes sgp-ch-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sgp-ch-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.sgp-ch-file-icon svg {
    width: 16px;
    height: 16px;
}

.sgp-ch-file-name {
    vertical-align: middle;
}

.sgp-ch-notifications-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.sgp-ch-notifications-bell-icon {
    color: var(--sgp-ch-notif-bell-color, #ffffff);
    background-color: var(--sgp-ch-notif-bell-bg, #111827);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sgp-ch-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    font-weight: 600;
    background-color: var(--sgp-ch-notif-badge-bg, #ef4444);
    color: var(--sgp-ch-notif-badge-text, #ffffff);
    padding: 0 4px;
    box-sizing: border-box;
    z-index: 2;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"]{
    position: relative;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"] .sgp-ch-tile-head{
    position: static !important;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"] .sgp-ch-notifications-badge.sgp-ch-messages-badge{
    top: 10px !important;
    right: 10px !important;
    min-width: 22px !important;
    height: 22px !important;
    line-height: 16px !important;
    font-size: 11px !important;
    padding: 0 4px !important;
    border-radius: 999px !important;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"] .sgp-ch-badge.sgp-ch-badge--warning{
    font-size: 14px;
}
.sgp-client-hub-dashboard .sgp-ch-notifications-badge,
.sgp-client-hub-dashboard .sgp-ch-badge,
.sgp-client-hub-dashboard .sgp-ch-badge-pop{
    animation: sgpBadgeIn 200ms ease-out both;
}
@keyframes sgpBadgeIn{
    from{
        opacity:0;
        transform:scale(.92);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}
@media (prefers-reduced-motion: reduce){
    .sgp-client-hub-dashboard .sgp-ch-notifications-badge,
    .sgp-client-hub-dashboard .sgp-ch-badge,
    .sgp-client-hub-dashboard .sgp-ch-badge-pop{
        animation:none;
        transform:none;
    }
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="tickets"] .sgp-ch-notifications-badge,
.sgp-client-hub-dashboard .sgp-client-hub-tile-tickets .sgp-ch-notifications-badge{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    display:inline-flex!important;
    pointer-events:none;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="tickets"]:not(:hover) .sgp-ch-notifications-badge{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    display:inline-flex!important;
}
.sgp-client-hub-tile[data-tile="tickets"]{
  position: relative !important;
}
.sgp-client-hub-tile[data-tile="tickets"] .sgp-ch-notifications-badge{
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 22px !important;
  z-index: 2 !important;
}
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"]::before,
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="messages"]::after,
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="notifications"]::before,
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="notifications"]::after,
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="files"]::before,
.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="files"]::after{
    content:none !important;
    display:none !important;
}

.sgp-ch-project-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 1024px) {
    .sgp-ch-project-layout {
        grid-template-columns: 1.2fr 1fr;
        align-items: flex-start;
    }
}

.sgp-ch-project-layout__col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sgp-ch-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 18px 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.sgp-ch-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sgp-ch-card__title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sgp-ch-project-hero {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.sgp-ch-project-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.sgp-ch-project-layout .sgp-ch-section__header h3 {
    margin: 0;
}

.sgp-ch-timeline {
    position: relative;
    margin-left: 12px;
    padding-left: 16px;
}

.sgp-ch-timeline:before {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    width: 2px;
    height: calc(100% - 12px);
    background: #e5e7eb;
}

.sgp-ch-timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    margin-bottom: 14px;
}

.sgp-ch-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #2563eb;
    border: 3px solid #e5e7eb;
    position: relative;
    top: 2px;
}

.sgp-ch-timeline-item--done .sgp-ch-timeline-dot {
    background: #16a34a;
}

.sgp-ch-timeline-content {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.sgp-ch-timeline-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.sgp-ch-timeline-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6b7280;
}

.sgp-ch-checklist-summary {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: #111827;
}

.sgp-ch-checklist__item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.sgp-ch-checklist__item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sgp-ch-checklist__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.sgp-ch-checklist__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sgp-ch-checklist__files {
    margin-top: 8px;
}

.sgp-ch-checklist__actions {
    margin-top: 8px;
}

.sgp-ch-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .sgp-ch-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sgp-ch-meta-block h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

.sgp-ch-meta-list {
    margin: 0;
    padding-left: 16px;
}

.sgp-ch-meta-item {
    margin-bottom: 6px;
}

.sgp-ch-docs-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sgp-ch-docs-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sgp-ch-docs-block__head h5 {
    margin: 0;
    font-size: 16px;
}

.sgp-ch-docs-block__head .sgp-ch-muted {
    margin: 0;
}

.sgp-ch-docs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 782px) {
    .sgp-ch-docs-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

.sgp-ch-doc-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sgp-ch-doc-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sgp-ch-doc-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sgp-ch-doc-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sgp-ch-doc-card__actions {
    margin-top: 4px;
}

.sgp-ch-meta-list--compact .sgp-ch-meta-item {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.sgp-ch-meta-item--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sgp-ch-meta-left {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.sgp-ch-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sgp-ch-docs-block--archives details summary {
    cursor: pointer;
    color: #0f172a;
}

.sgp-ch-docs-block--archives details[open] summary {
    margin-bottom: 8px;
}

.sgp-ch-messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sgp-ch-message {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.sgp-ch-message--client {
    margin-left: auto;
    text-align: right;
}

.sgp-ch-message--admin {
    margin-right: auto;
    text-align: left;
}

.sgp-ch-message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.sgp-ch-message-body {
    margin-top: 6px;
}

.sgp-ch-messages-form {
    margin-top: 14px;
}

.sgp-ch-project-back--top {
    margin-bottom: 12px;
}

.sgp-ch-project-layout__col .sgp-ch-section__header {
    margin-bottom: 10px;
}

/* Onglets projet (squelette) */
.sgp-ch-project-tabs {
    margin: 16px 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    --sgp-ch-tab-color: #111827;
    --sgp-ch-tab-active-color: #0f172a;
}

.sgp-ch-project-tabs .sgp-ch-tablist {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.sgp-ch-project-tabs .sgp-ch-tab {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.12);
    color: var(--sgp-ch-tab-color, #111827);
    border-radius: 18px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: background 140ms ease, border-color 140ms ease, color 0.15s ease, opacity 0.15s ease, transform 140ms ease;
    box-shadow: none;
}

.sgp-ch-project-tabs .sgp-ch-tab:hover {
    color: var(--sgp-ch-tab-active-color, #0f172a);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.sgp-ch-project-tabs .sgp-ch-tab:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.4);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.sgp-ch-project-tabs .sgp-ch-tab.is-active {
    color: var(--sgp-ch-tab-active-color, #0f172a);
}

.sgp-ch-project-tabs .sgp-ch-tab-dot {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--sgp-ch-accent, #ef4444);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
    pointer-events: none;
    z-index: 3;
}

.sgp-ch-project-tabs .sgp-ch-tab-indicator {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    transition: transform 180ms ease-out, width 180ms ease-out;
    pointer-events: none;
}

.sgp-ch-project-tabs .sgp-ch-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: #0f172a;
}

.sgp-ch-project-tabs .sgp-ch-nav-label {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sgp-ch-project-tabs .sgp-ch-tablist {
    justify-content: center;
}

@media (max-width: 768px) {
    .sgp-ch-project-tabs {
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .sgp-ch-project-tabs .sgp-ch-tablist {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding: 8px 12px;
        padding-right: 24vw;
        scroll-snap-type: x mandatory;
    }

    .sgp-ch-project-tabs .sgp-ch-tablist::-webkit-scrollbar {
        display: none;
    }

    .sgp-ch-project-tabs .sgp-ch-tab {
        flex: 0 0 clamp(92px, 22vw, 120px);
        min-height: 64px;
        border-radius: 18px;
        border: 1px solid rgba(15, 23, 42, 0.06);
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 12px 14px;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .sgp-ch-project-tabs .sgp-ch-tab-dot {
        top: 8px;
        right: 8px;
    }
}

.sgp-ch-project-tabs .sgp-ch-tab.is-active {
    color: var(--sgp-ch-tab-active-color, #0f172a);
}

.sgp-ch-project-tabs .sgp-ch-tab:hover {
    color: var(--sgp-ch-tab-active-color, #0f172a);
}

.sgp-ch-project-tabs .sgp-ch-tab {
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 769px) {
    .sgp-ch-project-tabs .sgp-ch-tablist {
        justify-content: center;
        overflow: visible;
        padding: 10px 0;
        gap: 18px;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0;
        box-shadow: none !important;
    }

    .sgp-ch-project-tabs .sgp-ch-tab {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(15, 23, 42, 0.06);
        border-radius: 18px;
        padding: 10px 14px;
    }

    .sgp-ch-project-tabs .sgp-ch-tab.is-active {
        background: rgba(255, 255, 255, 0.12);
    }
}

.sgp-ch-project-tabs .sgp-ch-tabpanels {
    padding: 12px;
    display: grid;
    gap: 10px;
}
.sgp-ch-project-tabs.sgp-ios-panels .sgp-ch-tabpanels {
    position: relative;
    min-height: 1px;
}

.sgp-ch-project-tabs .sgp-ch-tabpanel {
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #f9fafb;
    color: #475569;
    font-size: 13px;
}

.sgp-ch-project-tabs.sgp-tabs-js .sgp-ch-tabpanel {
    display: none;
}

.sgp-ch-project-tabs.sgp-tabs-js .sgp-ch-tabpanel.is-active {
    display: block;
    animation: sgpTabIn 180ms ease-out;
}

@keyframes sgpTabIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgp-ch-project-tabs .sgp-ch-tabpanel {
        animation: none !important;
        transition: none !important;
    }

    .sgp-ch-project-tabs .sgp-ch-tab-indicator {
        transition: none !important;
    }
}
.sgp-ch-project-tabs.sgp-ios-panels .sgp-ch-tabpanel {
    display: block !important;
    height: auto;
}

.sgp-ch-project-tabs.sgp-ios-panels .sgp-ch-tabpanel.is-active {
    position: relative;
    inset: auto;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    width: 100%;
}

.sgp-ch-project-tabs.sgp-ios-panels .sgp-ch-tabpanel:not(.is-active) {
    position: absolute;
    inset: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
/* Active tile: remove the ugly inner grey border (desktop + mobile) */
.sgp-ch-project-tabs .sgp-ch-tab-indicator{
  border: 0 !important;                 /* kill inner contour */
  outline: none !important;
  box-shadow:
    0 10px 30px rgba(0,0,0,.08),
    0 1px 0 rgba(255,255,255,.55) inset; /* subtle premium edge without grey border */
}

/* Ensure the active button itself doesn't add a border/outline */
.sgp-ch-project-tabs .sgp-ch-tab.is-active{
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

/* If some browsers show a focus ring: keep it only on keyboard focus, not as a grey contour */
.sgp-ch-project-tabs .sgp-ch-tab:focus{
  outline: none !important;
}
.sgp-ch-project-tabs .sgp-ch-tab:focus-visible{
  outline: 2px solid rgba(15,23,42,.18) !important;
  outline-offset: 2px;
}
/* Dashboard tiles: force 1 column on real mobile (incl. iPhone Pro Max) */
@media (max-width: 980px) {
  .sgp-client-hub-dashboard-tiles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .sgp-client-hub-dashboard-tiles > .sgp-client-hub-tile {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* === SGP Client Hub — HERO projet (premium) === */
.sgp-ch-project-hero{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  padding:18px 18px;
  box-shadow:0 12px 34px rgba(15,23,42,.06);
}

.sgp-ch-project-hero h1,
.sgp-ch-project-hero .sgp-ch-project-title{
  margin:0 0 10px 0;
  line-height:1.15;
  letter-spacing:-0.2px;
}

.sgp-ch-project-hero__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.sgp-ch-project-hero__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.sgp-ch-project-hero__pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background:rgba(15,23,42,.03);
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}

.sgp-ch-project-hero .sgp-ch-status-badge{
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}

/* Mobile : statut sous le titre si besoin */
@media (max-width: 768px){
  .sgp-ch-project-hero{
    padding:16px 14px;
  }
  .sgp-ch-project-hero__header{
    align-items:flex-start;
  }
  .sgp-ch-project-hero__meta{
    gap:8px;
  }
  .sgp-ch-project-hero__pill,
  .sgp-ch-project-hero .sgp-ch-status-badge{
    font-size:12.5px;
    padding:8px 11px;
  }
}

/* === SGP Client Hub — Messages style iMessage (safe, polling-compatible) === */
.sgp-ch-section--messages{
  position:relative;
}

.sgp-ch-messages-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* Bulle générique */
.sgp-ch-message{
  max-width:68%;
  padding:10px 12px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 8px 18px rgba(15,23,42,.05);
  overflow:hidden;
}

/* Reçu (admin) à gauche */
.sgp-ch-message--admin{
  align-self:flex-start;
  background:#f2f2f7;
  color:#111827;
}

/* Envoyé (client) à droite */
.sgp-ch-message--client{
  align-self:flex-end;
  background:#0a84ff;
  color:#fff;
  border-color:rgba(10,132,255,.35);
}

/* Meta */
.sgp-ch-message-meta{
  display:flex;
  gap:10px;
  font-size:12px;
  line-height:1.2;
  opacity:.85;
  margin-bottom:6px;
}

.sgp-ch-message--client .sgp-ch-message-meta{
  justify-content:flex-end;
  text-align:right;
}

.sgp-ch-message--admin .sgp-ch-message-meta{
  justify-content:flex-start;
  text-align:left;
}

/* Corps */
.sgp-ch-message-body{
  font-size:14px;
  line-height:1.35;
}

.sgp-ch-message-body p{
  margin:0;
}

.sgp-ch-message-body *{
  color:inherit;
}

/* “Tail” discret (optionnel, sans toucher au DOM) */
.sgp-ch-message--admin::after,
.sgp-ch-message--client::after{
  content:"";
  position:absolute;
  width:12px;
  height:12px;
  bottom:8px;
  transform:rotate(45deg);
  border-radius:3px;
  opacity:.95;
}

.sgp-ch-message--admin{
  position:relative;
}
.sgp-ch-message--admin::after{
  left:-5px;
  background:#f2f2f7;
  border-left:1px solid rgba(15,23,42,.10);
  border-bottom:1px solid rgba(15,23,42,.10);
}

.sgp-ch-message--client{
  position:relative;
}
.sgp-ch-message--client::after{
  right:-5px;
  background:#0a84ff;
  border-right:1px solid rgba(10,132,255,.35);
  border-bottom:1px solid rgba(10,132,255,.35);
}

/* Responsive : bulles un peu plus larges */
@media (max-width: 768px){
  .sgp-ch-message{
    max-width:86%;
  }
}

/* =========================
   iMessage-like Messages UI
   ========================= */

.sgp-ch-section--messages{
  /* fond global panel messages (reste neutre) */
  background: var(--sgp-ch-messages-panel-bg, #ffffff);
}

.sgp-ch-messages-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding: 8px 0;
}

/* Bulle générique */
.sgp-ch-message{
  width: fit-content;
  max-width: min(680px, 72%);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 8px 22px rgba(15,23,42,0.06);
  position: relative;
  overflow: hidden;
}

/* Meta (auteur + date) plus clean */
.sgp-ch-message-meta{
  display:flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 6px 0;
  font-size: 12px;
  line-height: 1.2;
  opacity: .9;
}

.sgp-ch-message-author{
  font-weight: 700;
}

.sgp-ch-message-date{
  font-weight: 500;
  opacity: .75;
}

/* Corps */
.sgp-ch-message-body{
  font-size: 14px;
  line-height: 1.35;
}
.sgp-ch-message-body p{
  margin: 0;
}

/* ADMIN (reçu) à gauche */
.sgp-ch-message--admin{
  margin-right: auto;
  text-align: left;
  background: var(--sgp-ch-msg-admin-bg, #eef2f5);
  color: var(--sgp-ch-msg-admin-text, #0f172a);
  border-color: rgba(15,23,42,0.10);
}

/* CLIENT (envoyé) à droite */
.sgp-ch-message--client{
  margin-left: auto;
  text-align: right;
  background: var(--sgp-ch-msg-client-bg, linear-gradient(120deg,#0f7cd8,#0bb49d));
  color: var(--sgp-ch-msg-client-text, #ffffff);
  border-color: rgba(255,255,255,0.22);
}

/* Si le texte est blanc côté client, on force la meta lisible */
.sgp-ch-message--client .sgp-ch-message-meta,
.sgp-ch-message--client .sgp-ch-message-meta *{
  color: inherit;
  opacity: .92;
}

/* Tail (pointe) optionnelle, propre et légère */
.sgp-ch-message--admin::after{
  content:"";
  position:absolute;
  left: -6px;
  top: 14px;
  width: 14px;
  height: 14px;
  background: var(--sgp-ch-msg-admin-bg, #eef2f5);
  border-left: 1px solid rgba(15,23,42,0.10);
  border-bottom: 1px solid rgba(15,23,42,0.10);
  transform: rotate(45deg);
  border-bottom-left-radius: 4px;
}

.sgp-ch-message--client::after{
  content:"";
  position:absolute;
  right: -6px;
  top: 14px;
  width: 14px;
  height: 14px;
  background: var(--sgp-ch-msg-client-bg, #0f7cd8);
  border-right: 1px solid rgba(255,255,255,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.22);
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

/* Mobile : bulles plus larges */
@media (max-width: 640px){
  .sgp-ch-message{
    max-width: 88%;
  }
}

/* =========================
   iMessage-style messages
   Scope: uniquement dans la section Messages
   ========================= */

.sgp-ch-section--messages .sgp-ch-messages-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}

/* Base bubble (spec élevé + scoped) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message{
  width: fit-content;
  max-width: min(720px, 72%);
  padding: 12px 14px;
  border-radius: 18px;
  border: 0 !important;              /* neutralise les vieux borders */
  box-shadow: 0 8px 22px rgba(15,23,42,0.06);
  background: #f3f4f6;
  color: #0f172a;
  line-height: 1.35;
  overflow: hidden;                   /* évite débordement arrondi */
}

/* Admin (gauche) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin{
  margin-right: auto;
  text-align: left;
  background: var(--sgp-ch-msg-admin-bg, #eef2ff);
  color: var(--sgp-ch-msg-admin-text, #0f172a);
}

/* Client (droite) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--client{
  margin-left: auto;
  text-align: right;
  background: var(--sgp-ch-msg-client-bg, linear-gradient(120deg,#0f7cd8,#0bb49d));
  color: var(--sgp-ch-msg-client-text, #ffffff);
}

/* Meta : plus compacte + lisible */
.sgp-ch-section--messages .sgp-ch-message-meta{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  opacity: .85;
}

/* Meta align selon side */
.sgp-ch-section--messages .sgp-ch-message--client .sgp-ch-message-meta{
  justify-content: flex-end;
}
.sgp-ch-section--messages .sgp-ch-message--admin .sgp-ch-message-meta{
  justify-content: flex-start;
}

/* Auteur un poil plus “kicker” */
.sgp-ch-section--messages .sgp-ch-message-author{
  font-weight: 700;
}
.sgp-ch-section--messages .sgp-ch-message-date{
  font-weight: 500;
  opacity: .8;
}

/* Corps message propre */
.sgp-ch-section--messages .sgp-ch-message-body p{
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Optionnel : petite “queue” iMessage (discret) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin::after{
  content: "";
  position: absolute;
  width: 0; height: 0;
  border: 8px solid transparent;
  border-right-color: transparent;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message{
  position: relative;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin::after{
  left: -6px; top: 14px;
  border-right-color: var(--sgp-ch-msg-admin-bg, #eef2ff);
  border-left: 0;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--client::after{
  content: "";
  position: absolute;
  right: -6px; top: 14px;
  width: 0; height: 0;
  border: 8px solid transparent;
  border-left-color: var(--sgp-ch-msg-client-bg, #0f7cd8);
  border-right: 0;
}
/* Si bg client = gradient, la “queue” prend une couleur solide acceptable */
/* =========================================================
   iMessage-style (FO) � SGP Client Hub � Messages only
   Client: #1b96fd + white text
   Admin : #e9e9ea + black text
   + grouping (sans JS) + arrondis variables + blur soft
   ========================================================= */

.sgp-ch-section--messages .sgp-ch-messages-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:8px 0;
}

/* Base bubble */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message{
  position:relative;
  width:fit-content;
  max-width:min(720px, 72%);
  padding:10px 14px;
  border:0 !important;
  outline:0 !important;
  box-shadow:0 10px 26px rgba(15,23,42,.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  line-height:1.35;
  overflow:hidden;
}

/* Reset internes pour forcer la couleur partout */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message,
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message *{
  color: inherit !important;
}

/* Admin (gauche) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin{
  margin-right:auto;
  text-align:left;
  background:#e9e9ea !important;
  color:#000 !important;
}

/* Client (droite) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--client{
  margin-left:auto;
  text-align:right;
  background:#1b96fd !important;
  color:#fff !important;
}

/* Meta */
.sgp-ch-section--messages .sgp-ch-message-meta{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin-bottom:6px;
  font-size:12px;
  opacity:.9;
}
.sgp-ch-section--messages .sgp-ch-message--client .sgp-ch-message-meta{ justify-content:flex-end; }
.sgp-ch-section--messages .sgp-ch-message--admin  .sgp-ch-message-meta{ justify-content:flex-start; }

.sgp-ch-section--messages .sgp-ch-message-author{ font-weight:700; }
.sgp-ch-section--messages .sgp-ch-message-date{ font-weight:500; opacity:.85; }

/* Body */
.sgp-ch-section--messages .sgp-ch-message-body p{
  margin:0;
  white-space:pre-wrap;
  word-wrap:break-word;
}

/* ---------------------------------------------------------
   �Grouping� (sans JS) � r�duit l�espace entre messages cons�cutifs
   + arrondis iMessage (bulle isol�e vs bulle group�e)
   --------------------------------------------------------- */

/* Espacement r�duit si m�me auteur cons�cutif */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin + .sgp-ch-message--admin,
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client + .sgp-ch-message--client{
  margin-top:-4px; /* rapprochement */
}

/* Forme par d�faut (message isol�) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin{
  border-radius:18px 18px 18px 6px;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--client{
  border-radius:18px 18px 6px 18px;
}

/* Si un message est suivi d�un autre du m�me auteur : aplatit coin bas c�t� queue */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin:has(+ .sgp-ch-message--admin){
  border-bottom-left-radius:10px;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client:has(+ .sgp-ch-message--client){
  border-bottom-right-radius:10px;
}

/* Si un message est pr�c�d� d�un autre du m�me auteur : aplatit coin haut c�t� queue */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin + .sgp-ch-message--admin{
  border-top-left-radius:10px;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client + .sgp-ch-message--client{
  border-top-right-radius:10px;
}

/* ---------------------------------------------------------
   Petite �queue� iMessage (discr�te)
   - On n�affiche la queue que sur le dernier message d�un groupe
   --------------------------------------------------------- */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message::after{
  content:"";
  position:absolute;
  top:14px;
  width:0; height:0;
  border:8px solid transparent;
}

/* Admin queue (dernier du groupe seulement) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin::after{
  left:-6px;
  border-right-color:#e9e9ea;
  border-left:0;
  display:none;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin:not(:has(+ .sgp-ch-message--admin))::after{
  display:block;
}

/* Client queue (dernier du groupe seulement) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client::after{
  right:-6px;
  border-left-color:#1b96fd;
  border-right:0;
  display:none;
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client:not(:has(+ .sgp-ch-message--client))::after{
  display:block;
}

/* ---------------------------------------------------------
   Compat (si :has() non support�) : rendu propre sans grouping avanc�
   --------------------------------------------------------- */
@supports not selector(:has(+ *)) {
  .sgp-ch-section--messages .sgp-ch-messages-list{
    gap:12px;
  }
  .sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--admin::after{ display:block; }
  .sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message--client::after{ display:block; }
}

/* Responsive : sur mobile, bulles plus larges */
@media (max-width: 640px){
  .sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message{
    max-width: 86%;
  }
}
.sg-ch-nav-icon-img{
  display:block;
  width:20px;
  height:20px;
  object-fit:contain;
}

/* Vue projet : taille icônes onglets */
.sgp-ch-project-view .sgp-ch-nav-icon{
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 30px;
}

.sgp-ch-project-view .sgp-ch-nav-icon-img{
  width:30px;
  height:30px;
  display:block;
  object-fit:contain;
}

.sgp-ch-project-view .sgp-ch-nav-icon svg{
  width:30px;
  height:30px;
  display:block;
}

/* Labels responsives onglets - scope vue projet */
.sgp-ch-project-view .sgp-ch-nav-label__tablet,
.sgp-ch-project-view .sgp-ch-nav-label__mobile { display: none; }

/* Tablette */
@media (max-width: 1024px) {
  .sgp-ch-project-view .sgp-ch-nav-label__desktop { display: none; }
  .sgp-ch-project-view .sgp-ch-nav-label__tablet { display: inline; }
}

/* Mobile (inclut iPhone 16 Pro Max ~430px CSS) */
@media (max-width: 480px) {
  .sgp-ch-project-view .sgp-ch-nav-label__tablet { display: none; }
  .sgp-ch-project-view .sgp-ch-nav-label__mobile { display: inline; }
}

.sgp-ch-project-view .sgp-ch-nav-label { white-space: nowrap; }

/* Kill message bubble tails (no iMessage tail) */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message::after,
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message::before{
  content: none !important;
  display: none !important;
  border: 0 !important;
}

/* Tunings iMessage : padding/shadow/meta */
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message{
  padding:10px 12px;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.sgp-ch-section--messages .sgp-ch-messages-list .sgp-ch-message.sgp-ch-message--admin{
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}

.sgp-ch-section--messages .sgp-ch-message-meta{
  font-size:12px;
  opacity:.75;
}
.sgp-ch-section--messages .sgp-ch-message--client .sgp-ch-message-meta,
.sgp-ch-section--messages .sgp-ch-message--client .sgp-ch-message-meta *{
  color: rgba(255,255,255,0.9) !important;
}
.sgp-ch-section--messages .sgp-ch-message--admin .sgp-ch-message-meta,
.sgp-ch-section--messages .sgp-ch-message--admin .sgp-ch-message-meta *{
  color: rgba(0,0,0,0.8) !important;
}

/* Dashboard layout tuning (scope dashboard) */
.sgp-client-hub-dashboard-tiles{
  align-items:start;
}

.sgp-client-hub-dashboard .sgp-ch-tile--projects.sgp-ch-tile--full{
  grid-column:1 / -1;
}

.sgp-client-hub-dashboard-tiles .sgp-client-hub-tile:not(.sgp-ch-tile--projects) ul{
  max-height:240px;
  overflow:auto;
}
.sgp-client-hub-dashboard-tiles > .sgp-client-hub-tile{
  align-self:start;
}

.sgp-client-hub-dashboard .sgp-client-hub-dashboard-tiles .sgp-client-hub-tile:not(.sgp-ch-tile--projects) ul{
  max-height:240px;
  overflow:auto;
}

.sgp-ch-label--tablet,
.sgp-ch-label--mobile,
.sgp-ch-nav-label__tablet,
.sgp-ch-nav-label__mobile{ display:none; }

@media (max-width: 1024px){
  .sgp-ch-label--desktop,
  .sgp-ch-nav-label__desktop{ display:none; }
  .sgp-ch-label--tablet,
  .sgp-ch-nav-label__tablet{ display:inline; }
}

@media (max-width: 767px){
  .sgp-ch-label--tablet,
  .sgp-ch-nav-label__tablet{ display:none; }
  .sgp-ch-label--mobile,
  .sgp-ch-nav-label__mobile{ display:inline; }
}

/* Mobile Messages form layout fix */
@media (max-width: 520px) {
  .sgp-ch-section--messages {
    overflow-x: hidden;
  }

  .sgp-ch-section--messages .sgp-ch-messages-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .sgp-ch-section--messages .sgp-ch-messages-form .sgp-dl-field,
  .sgp-ch-section--messages .sgp-ch-messages-form .sgp-ch-field {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sgp-ch-section--messages .sgp-ch-messages-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 120px;
  }

  .sgp-ch-section--messages .sgp-ch-messages-form .sgp-dl-btn,
  .sgp-ch-section--messages .sgp-ch-messages-form .sgp-ch-btn {
    width: 100%;
    max-width: 100%;
  }
}
/* Responsive fix: stack message form on small screens */
@media (max-width:520px){
  .sgp-ch-message-form,
  .sgp-ch-message-form * { box-sizing: border-box; }

  .sgp-ch-message-form .sgp-ch-form-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .sgp-ch-message-form .sgp-ch-form-row textarea#sgp_ch_message_body,
  .sgp-ch-message-form .sgp-ch-form-row .sgp-dl-textarea{
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 120px !important;
    resize: vertical !important;
  }

  .sgp-ch-message-form .sgp-ch-form-row button[type="submit"]{
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
  }
}
/* Dashboard Documents badge: always visible (no hover dependency) */
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-documents-badge {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: inline-flex !important;
}
.sgp-client-hub-tile[data-tile="files"]:not(:hover) .sgp-ch-documents-badge {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: inline-flex !important;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-tile-head {
    position: relative;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-documents-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 3 !important;
}

/* Documents tile badge — match Messages exactly */
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-tile-head{
    position: relative;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-notifications-badge.sgp-ch-documents-badge{
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    background: #ef4444 !important;
    color: #fff !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    z-index: 3 !important;
}

/* Dashboard Documents badge — align to Messages */
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-documents-badge{
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 22px !important;
    background: #ef4444 !important;
    color: #fff !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    z-index: 3 !important;
}

.sgp-client-hub-dashboard .sgp-client-hub-tile[data-tile="files"] .sgp-ch-notifications-badge.sgp-ch-documents-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0 2px !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    line-height: 22px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    z-index: 2 !important;
}

/* DASH: Documents badge — robust selector (no wrapper dependency) */
.sgp-client-hub-tile[data-tile="files"]{
  position: relative;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-notifications-badge.sgp-ch-documents-badge{
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 22px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  z-index: 2 !important;
}
/* DASH Documents badge: anchor on tile, match Messages/Notifications */
.sgp-client-hub-tile[data-tile="files"]{
  position: relative !important;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-tile-head{
  position: static !important;
  transform: none !important;
}
.sgp-client-hub-tile[data-tile="files"] .sgp-ch-notifications-badge.sgp-ch-documents-badge{
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 22px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}

/* Scope Messages */
.sgp-scope.sgp-ch-messages .sgp-ch-messages-grid{
  display:grid;
  gap:12px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-messages-thread{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
  padding:0;
  list-style:none;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-inline{
  overflow:hidden;
  border:1px solid #e5e7eb;
  border-radius:12px;
  margin-top:8px;
  background:#fff;
  transition:height 200ms ease, opacity 200ms ease;
  opacity:0;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-inline__content{
  padding:12px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-inline__actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-bottom:12px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-inline-placeholder{
  color:#6b7280;
  font-size:14px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-inline-alert{
  margin:10px 0;
  padding:10px 12px;
  border:1px solid #fcd34d;
  border-radius:10px;
  background:#fffbeb;
  color:#92400e;
  font-size:14px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-main{
  min-width:0;
  flex:1;
}

.sgp-scope.sgp-ch-messages .sgp-ch-thread-actions{
  flex:0 0 auto;
}

.sgp-scope.sgp-ch-messages .sgp-ch-messages-header-card{
  margin-bottom:12px;
}

@media (max-width: 820px){
  .sgp-scope.sgp-ch-messages .sgp-ch-messages-grid{
    grid-template-columns:1fr;
  }
}

/* Dashboard tiles: grille pleine largeur */
.sgp-client-hub-dashboard-tiles{
  width: 100%;
}

@media (min-width: 1024px){
  .sgp-client-hub-dashboard-tiles{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 640px) and (max-width: 1023px){
  .sgp-client-hub-dashboard-tiles{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

.sgp-client-hub-tile .sgp-ch-tile-docs-desc{
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 8px;
}



.sgp-client-hub-tile{
  display: flex;
  flex-direction: column;
}

.sgp-client-hub-tile .sgp-ch-tile-head{
  margin-bottom: 0 !important;
}

.sgp-client-hub-tile .sgp-client-hub-tile-title{
  margin: 0 0 4px 0 !important;
}

.sgp-client-hub-tile .sgp-ch-tile-docs-desc{
  margin: 0 0 12px 0 !important;
}

.sgp-client-hub-tile .sgp-ch-tile-actions{
  margin-top: auto !important;
}

.sgp-client-hub-dashboard .sgp-ch-project-mini__actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.sgp-client-hub-dashboard .sgp-ch-project-mini-btn{
  padding: 8px 12px !important;
  font-size: 12px;
  border-radius: 999px;
}
.sgp-client-hub-tile .sgp-ch-tile-actions,
.sgp-client-hub-tile .sgp-ch-tile-compact{
  padding: 0 !important;
}

.sgp-client-hub-tile .sgp-ch-tile-actions .sgp-dl-btn,
.sgp-client-hub-tile .sgp-dl-btn{
  margin: 0 !important;
  line-height:1.2;
}

.sgp-client-hub-tile button.sgp-dl-btn{
  margin-bottom: 0 !important;
}

.sgp-client-hub-tile .sgp-ch-tile-unread-line{
  display: none !important;
}




/* PROJET > ONGLET DOCUMENTS : rendre "Documents de suivi" cohérent avec les cartes */

.sgp-ch-docs-block--follow .sgp-ch-meta-list--compact{
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;

  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}

.sgp-ch-docs-block--follow .sgp-ch-meta-item{
  margin: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  background: #fff !important;
}

.sgp-ch-docs-block--follow .sgp-ch-meta-item--row{
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

.sgp-ch-docs-block--follow .sgp-ch-meta-item--row .sgp-ch-meta-title{
  width: 100% !important;
  word-break: break-word !important;
}

.sgp-ch-docs-block--follow .sgp-ch-meta-status{
  align-self:flex-start !important;
  width:auto !important;
  max-width:fit-content !important;
}

.sgp-ch-docs-block--follow .sgp-ch-meta-item--row .sgp-dl-btn{
  width: 100% !important;
  justify-content: center !important;
}
/* "Voir les archives" : style bouton compact */
.sgp-ch-docs-block--archives summary,
.sgp-ch-docs-block--archives a{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 8px 12px !important; /* moins gros que les boutons */
  border-radius: 999px !important;
  text-decoration: none !important;

  background: rgba(2, 132, 199, 0.10) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
  color: #0369a1 !important;
  font-weight: 600 !important;
  transition:all 0.3s;
}

.sgp-ch-docs-block--archives summary:hover,
.sgp-ch-docs-block--archives a:hover{
  background: rgba(2, 132, 199, 0.16) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
}

.sgp-scope .sgp-ch-project-back {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sgp-scope .sgp-ch-project-back__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sgp-scope .sgp-ch-logoutbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sgp-scope .sgp-ch-logoutbar__hello {
  font-size: 13px;
}

/* GO FINITION — Dashboard
   Ajustement spécifique tuile Notifications */
.sgp-client-hub-tile.sgp-client-hub-tile-notifications .sgp-ch-tile-docs-desc {
  margin: 0 0 4px 0 !important;
}

/* Étapes - bloc narratif */
.sgp-ch-steps-current {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  margin: 12px 0;
  display: grid;
  gap: 4px;
}

.sgp-ch-steps-current__eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: #0b5be0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sgp-ch-steps-current__position {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.sgp-ch-steps-current__title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.sgp-ch-steps-current__status {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.sgp-ch-steps-current__next-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-top: 8px;
}

.sgp-ch-steps-current__next {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.sgp-ch-steps-current__progress {
  margin-top: 8px;
}

.sgp-ch-steps-current__progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.sgp-ch-steps-current__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #0b5be0, #3b82f6);
}

.sgp-ch-step.is-current {
  border-left: 3px solid #0b5be0;
  background: #f1f5f9;
}

.sgp-ch-step.is-done {
  opacity: 0.7;
}

.sgp-ch-step.is-upcoming {
  opacity: 0.9;
}

@media (max-width: 782px) {
  .sgp-ch-steps-current {
    padding: 14px;
    gap: 6px;
  }
}
.sgp-scope .sgp-dl-actions{
  display:flex;
  justify-content:center;
  margin:6px 0 14px 0;
}


.sgp-scope .sgp-ch-ma-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
}

.sgp-scope .sgp-ch-ma-actions .sgp-dl-btn {
    min-width: 220px;
}

.sgp-scope .sgp-ch-section--mes-acces .sgp-dl-actions,
.sgp-scope .sgp-ch-section--mes-acces .sgp-ch-ma-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
}

.sgp-scope .sgp-ch-section--mes-acces .sgp-dl-actions .sgp-dl-btn {
    min-width: 220px;
}
