/*
 * Support : « Nous contacter » (/support/contact), suivi d'une demande (/support/ticket), « Mes demandes » (/account/support).
 * Uniquement les tokens et composants du design system (static/css/ds/). Préfixe : sp-
 */

/* --- Teintes des icônes ------------------------------------------ */
.sp-tone--blue { background: var(--ds-info-soft); color: var(--ds-info); }
.sp-tone--orange { background: var(--ds-accent-soft); color: var(--ds-accent-text); }
.sp-tone--rose { background: #fde4ec; color: #b4235a; }
.sp-tone--green { background: var(--ds-success-soft); color: var(--ds-success); }
.sp-tone--sand { background: #f5ecdc; color: #8a5a17; }

.dark-mode .sp-tone--rose { background: rgba(244, 114, 182, 0.16); color: #f9a8d4; }
.dark-mode .sp-tone--sand { background: rgba(217, 168, 95, 0.16); color: #e8c48d; }
.dark-mode .sp-tone--blue { color: #93b4ef; }
.dark-mode .sp-tone--green { color: #7fd29d; }

.sp {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-8);
}

.sp [hidden] {
  display: none !important;
}

.sp h1,
.sp h2,
.sp-step__title,
.sp-aside__title {
  font-family: var(--ds-font-display);
  font-weight: 500;
}

/* --- En-tête ------------------------------------------------------ */
.sp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 56px) clamp(22px, 5vw, 56px);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.sp-hero::before,
.sp-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.sp-hero::before {
  width: 380px;
  height: 380px;
  right: -120px;
  top: -190px;
  background: var(--ds-accent-soft);
}

.sp-hero::after {
  width: 220px;
  height: 220px;
  right: 160px;
  bottom: -170px;
  background: var(--ds-primary-soft);
}

.sp-hero > * {
  position: relative;
  z-index: 1;
}

.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin: 0 0 var(--ds-space-4);
  padding: 6px 14px;
  border-radius: var(--ds-radius-badge);
  background: var(--ds-primary-soft);
  color: var(--ds-primary-text);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sp-title {
  max-width: 15em;
  margin: 0;
  font-size: clamp(1.8rem, 4.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ds-text);
}

.sp-title em {
  font-style: normal;
  color: var(--ds-accent-text);
}

.sp-lead {
  max-width: 38em;
  margin: var(--ds-space-4) 0 0;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--ds-text-2);
}

.sp-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-3);
  margin: var(--ds-space-8) 0 0;
  padding: 0;
  list-style: none;
}

.sp-shortcut {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  height: 100%;
  padding: var(--ds-space-3) var(--ds-space-4);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  color: var(--ds-text) !important;
  text-decoration: none;
  transition: transform var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration) var(--ds-ease), border-color var(--ds-duration) var(--ds-ease);
}

.sp-shortcut:hover {
  transform: translateY(-2px);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-sm);
}

.sp-shortcut strong {
  display: block;
  font-size: var(--ds-text-sm);
}

.sp-shortcut span span {
  display: block;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-2);
  line-height: 1.4;
}

.sp-shortcut__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.05rem;
}

/* --- Mise en page ------------------------------------------------- */
.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--ds-space-6);
  align-items: start;
}

.sp-main {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  min-width: 0;
}

.sp-aside {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  position: sticky;
  top: 96px;
}

.sp-aside__title {
  margin: 0;
  font-size: var(--ds-text-lg);
  color: var(--ds-text);
}

/* --- Formulaire --------------------------------------------------- */
.sp-form {
  padding: clamp(20px, 4vw, 36px);
}

.sp-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sp-step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sp-step + .sp-step {
  margin-top: var(--ds-space-10);
  padding-top: var(--ds-space-8);
  border-top: 1px solid var(--ds-border);
}

.sp-step__title {
  display: block;
  margin: 0;
  padding: 0;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.25;
  color: var(--ds-text);
  outline: none;
  box-shadow: none !important;
}

.sp-step__lead {
  margin: var(--ds-space-2) 0 var(--ds-space-6);
  color: var(--ds-text-2);
  font-size: var(--ds-text-sm);
}

.sp-step > .ds-field + .ds-field,
.sp-step > .sp-topic-group + .ds-field {
  margin-top: var(--ds-space-6);
}

.sp-optional {
  margin-left: 6px;
  font-weight: 400;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

/* Progression (affichée seulement en mode étapes) */
.sp-progress {
  display: none;
  margin-bottom: var(--ds-space-8);
}

.sp-progress__steps {
  display: flex;
  gap: var(--ds-space-5);
  margin: 0 0 var(--ds-space-3);
  padding: 0;
  list-style: none;
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text-3);
}

.sp-progress__steps li {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  transition: color var(--ds-duration) var(--ds-ease);
}

.sp-progress__steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--ds-surface-2);
  font-size: var(--ds-text-xs);
  transition: background var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease);
}

.sp-progress__steps li.is-current,
.sp-progress__steps li.is-done {
  color: var(--ds-text);
}

.sp-progress__steps li.is-current span {
  background: var(--ds-primary);
  color: var(--ds-on-primary);
}

.sp-progress__steps li.is-done span {
  background: var(--ds-primary-soft);
  color: var(--ds-primary-text);
}

.sp-progress__bar {
  height: 6px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-2);
  overflow: hidden;
}

.sp-progress__bar span {
  display: block;
  width: 33.3%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ds-primary), var(--ds-accent));
  transition: width 420ms var(--ds-ease);
}

/* Mode étapes (ajouté par support.js) : une étape à la fois */
.sp-form.is-stepped .sp-progress {
  display: block;
}

.sp-form.is-stepped .sp-step {
  display: none;
}

.sp-form.is-stepped .sp-step + .sp-step {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sp-form.is-stepped .sp-step.is-active {
  display: block;
  animation: sp-step-in 380ms var(--ds-ease) both;
}

.sp-form.is-stepped .sp-step.is-active.is-back {
  animation-name: sp-step-back;
}

@keyframes sp-step-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes sp-step-back {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

/* Étape 1 : tuiles de sujet */
.sp-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-3);
}

.sp-topic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
  border: 1.5px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface);
  cursor: pointer;
  transition: border-color var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease), background var(--ds-duration) var(--ds-ease);
}

.sp-topic:hover {
  border-color: var(--ds-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-sm);
}

.sp-topic input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sp-topic:has(input:focus-visible) {
  box-shadow: var(--ds-focus-ring);
}

.sp-topic:has(input:checked) {
  border-color: var(--ds-primary);
  background: var(--ds-primary-soft);
}

.sp-topic__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.1rem;
}

.sp-topic__text strong {
  display: block;
  font-size: var(--ds-text-base);
  line-height: 1.3;
  color: var(--ds-text);
}

.sp-topic__text span {
  display: block;
  margin-top: 2px;
  font-size: var(--ds-text-xs);
  line-height: 1.4;
  color: var(--ds-text-2);
}

.sp-topic__check {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ds-primary);
  color: var(--ds-on-primary);
  font-size: 0.75rem;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease);
}

.sp-topic:has(input:checked) .sp-topic__check {
  opacity: 1;
  transform: none;
}

/* Étape 2 : précisions propres au sujet (montrées selon la tuile cochée, même sans JavaScript) */
.sp-topic-group {
  display: none;
}

.sp-form:not(:has(input[name="topic"]:checked)) .sp-topic-group[data-topic-group="autre"],
.sp-form:has(input[name="topic"][value="compte"]:checked) [data-topic-group="compte"],
.sp-form:has(input[name="topic"][value="recette"]:checked) [data-topic-group="recette"],
.sp-form:has(input[name="topic"][value="breaky"]:checked) [data-topic-group="breaky"],
.sp-form:has(input[name="topic"][value="qualyy"]:checked) [data-topic-group="qualyy"],
.sp-form:has(input[name="topic"][value="nutri"]:checked) [data-topic-group="nutri"],
.sp-form:has(input[name="topic"][value="bug"]:checked) [data-topic-group="bug"],
.sp-form:has(input[name="topic"][value="pro"]:checked) [data-topic-group="pro"],
.sp-form:has(input[name="topic"][value="donnees"]:checked) [data-topic-group="donnees"],
.sp-form:has(input[name="topic"][value="autre"]:checked) [data-topic-group="autre"] {
  display: block;
}

.sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-2);
}

.sp-chip {
  position: relative;
  cursor: pointer;
}

.sp-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sp-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px solid var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-2);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
  transition: all var(--ds-duration) var(--ds-ease);
}

.sp-chip:hover span {
  border-color: var(--ds-border-strong);
  color: var(--ds-text);
}

.sp-chip input:focus-visible + span {
  box-shadow: var(--ds-focus-ring);
}

.sp-chip input:checked + span {
  border-color: var(--ds-primary);
  background: var(--ds-primary-soft);
  color: var(--ds-primary-text);
  font-weight: 600;
}

.sp-extra {
  margin-top: var(--ds-space-5);
}

.sp-textarea {
  position: relative;
}

.sp-textarea textarea,
.sp-composer textarea {
  display: block;
  min-height: 150px;
  max-height: 60vh;
  padding: 14px 16px 30px;
  line-height: 1.55;
  resize: vertical;
}

.sp-counter {
  position: absolute;
  right: 14px;
  bottom: 9px;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.sp-counter.is-low {
  color: var(--ds-warning);
}

/* Zone de dépôt des captures */
.sp-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: var(--ds-space-4);
  border: 1.5px dashed var(--ds-border-strong);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-2);
  color: var(--ds-text-2);
  cursor: pointer;
  transition: border-color var(--ds-duration) var(--ds-ease), background var(--ds-duration) var(--ds-ease);
}

.sp-drop:hover,
.sp-drop.is-over {
  border-color: var(--ds-primary);
  background: var(--ds-primary-soft);
}

.sp-drop:has(input:focus-visible) {
  box-shadow: var(--ds-focus-ring);
}

.sp-drop.is-full {
  display: none;
}

.sp-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.sp-form.is-enhanced .sp-drop input,
.sp-composer.is-enhanced .sp-drop input {
  pointer-events: none;
}

.sp-drop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ds-surface);
  color: var(--ds-primary-text);
  font-size: 1.1rem;
}

.sp-drop__text {
  font-size: var(--ds-text-sm);
}

.sp-drop__text strong {
  color: var(--ds-text);
}

.sp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-thumbs:empty {
  display: none;
}

.sp-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ds-surface-2);
  border: 1px solid var(--ds-border);
  animation: sp-pop 260ms var(--ds-ease) both;
}

.sp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-thumb button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  font-size: 0.75rem;
  cursor: pointer;
}

.sp-thumb__size {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 0.65rem;
}

@keyframes sp-pop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: none; }
}

/* Infos techniques */
.sp-context {
  margin-top: var(--ds-space-6);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-surface-2);
}

.sp-context__switch {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  cursor: pointer;
}

.sp-context__label {
  font-size: var(--ds-text-sm);
  font-weight: 600;
  color: var(--ds-text);
}

.sp-context .ds-hint {
  margin-top: var(--ds-space-2);
  padding-left: 60px;
}

/* Étape 3 */
.sp-member {
  display: flex;
  align-items: center;
  gap: var(--ds-space-4);
  margin-top: var(--ds-space-5);
  padding: var(--ds-space-4) var(--ds-space-5);
  border-radius: var(--ds-radius-md);
  background: var(--ds-primary-soft);
}

.sp-member__icon {
  font-size: 2rem;
  color: var(--ds-primary-text);
}

.sp-member__text strong {
  display: block;
  color: var(--ds-text);
}

.sp-member__text span {
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
}

.sp-suggest {
  margin: 0;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-2);
}

.sp-suggest button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ds-primary-text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.sp-recap {
  margin-top: var(--ds-space-6);
  padding: var(--ds-space-4) var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
}

.sp-recap__title {
  margin: 0 0 var(--ds-space-2);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-text-3);
}

.sp-recap dl {
  margin: 0;
}

.sp-recap dl > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: var(--ds-space-3);
  padding: 6px 0;
  font-size: var(--ds-text-sm);
}

.sp-recap dt {
  color: var(--ds-text-3);
}

.sp-recap dd {
  margin: 0;
  color: var(--ds-text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-legal {
  margin: var(--ds-space-5) 0 0;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

.sp-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: var(--ds-text-sm);
  color: var(--ds-danger);
}

.sp-error::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.8em;
}

.sp-form-error {
  margin-bottom: var(--ds-space-6);
}

.sp-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-8);
}

.sp-nav [data-step-back],
.sp-nav [data-step-next] {
  display: none;
}

.sp-form.is-stepped .sp-nav [data-step-back],
.sp-form.is-stepped .sp-nav [data-step-next] {
  display: inline-flex;
}

.sp-form:not(.is-stepped) .sp-step[data-step="2"] .sp-nav {
  display: none;
}

.sp-form:not(.is-stepped) .sp-step[data-step="3"] .sp-nav {
  justify-content: flex-end;
}

/* --- Confirmation ------------------------------------------------- */
.sp-success {
  padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 48px);
  text-align: center;
  outline: none;
  animation: sp-step-in 420ms var(--ds-ease) both;
}

.sp-success__badge {
  width: 84px;
  height: 84px;
  margin: 0 auto var(--ds-space-5);
}

.sp-success__badge svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sp-success__badge circle {
  stroke: var(--ds-success);
  fill: var(--ds-success-soft);
  stroke-dasharray: 152;
  stroke-dashoffset: 152;
  animation: sp-draw 600ms var(--ds-ease) 100ms forwards;
}

.sp-success__badge path {
  stroke: var(--ds-success);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: sp-draw 400ms var(--ds-ease) 550ms forwards;
}

@keyframes sp-draw {
  to { stroke-dashoffset: 0; }
}

.sp-success__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--ds-text);
}

.sp-success__text {
  max-width: 30em;
  margin: var(--ds-space-3) auto 0;
  color: var(--ds-text-2);
}

.sp-ref {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-6);
  padding: var(--ds-space-3) var(--ds-space-5);
  border: 1.5px dashed var(--ds-primary);
  border-radius: var(--ds-radius-md);
  background: var(--ds-primary-soft);
  color: var(--ds-primary-text);
  font-family: var(--ds-font-body);
  cursor: pointer;
}

.sp-ref__label {
  font-size: var(--ds-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sp-ref__value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.sp-next {
  display: grid;
  gap: var(--ds-space-2);
  max-width: 26em;
  margin: var(--ds-space-8) auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
}

.sp-next li {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.sp-next i {
  width: 32px;
  height: 32px;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ds-surface-2);
  color: var(--ds-primary-text);
}

.sp-success__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-8);
}

/* --- Colonne de droite -------------------------------------------- */
.sp-mine,
.sp-how {
  padding: var(--ds-space-5);
}

.sp-mine__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ds-space-3);
}

.sp-mine__head a {
  font-size: var(--ds-text-sm);
  font-weight: 600;
}

.sp-mine__list {
  margin: var(--ds-space-3) 0 0;
  padding: 0;
  list-style: none;
}

.sp-mine__list a {
  display: block;
  margin: 0 calc(-1 * var(--ds-space-3));
  padding: var(--ds-space-3);
  border-radius: 14px;
  color: var(--ds-text) !important;
  text-decoration: none;
}

.sp-mine__list a:hover {
  background: var(--ds-surface-hover);
}

.sp-mine__subject {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ds-text-sm);
  font-weight: 600;
}

.sp-mine__meta {
  display: block;
  margin-top: 2px;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

.sp-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ds-accent);
}

.sp-how__list {
  display: grid;
  gap: var(--ds-space-4);
  margin: var(--ds-space-4) 0 0;
  padding: 0;
  list-style: none;
}

.sp-how__list li {
  display: flex;
  gap: var(--ds-space-3);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
  line-height: 1.45;
}

.sp-how__list strong {
  display: block;
  color: var(--ds-text);
}

.sp-how__num {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--ds-accent-soft);
  color: var(--ds-accent-text);
  font-weight: 700;
  font-size: var(--ds-text-xs);
}

.sp-mail {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  padding: 0 var(--ds-space-2);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
}

/* --- Statuts ------------------------------------------------------ */
.sp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: var(--ds-radius-badge);
  font-size: var(--ds-text-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--ds-surface-2);
  color: var(--ds-text-2);
}

.sp-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.sp-status--accent { background: var(--ds-accent-soft); color: var(--ds-accent-text); }
.sp-status--primary { background: var(--ds-primary-soft); color: var(--ds-primary-text); }
.sp-status--success { background: var(--ds-success-soft); color: var(--ds-success); }
.sp-status--danger { background: var(--ds-danger-soft); color: var(--ds-danger); }

/* =================================================================
 * Suivi d'une demande (/support/ticket)
 * ================================================================= */
.sp-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--ds-space-6);
  align-items: start;
}

.sp-ticket__head {
  grid-column: 1 / -1;
}

.sp-back {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  margin-bottom: var(--ds-space-4);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  text-decoration: none;
}

.sp-ticket__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.2;
  color: var(--ds-text);
}

.sp-ticket__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2) var(--ds-space-4);
  margin-top: var(--ds-space-3);
  font-size: var(--ds-text-sm);
  color: var(--ds-text-2);
}

.sp-chipref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--ds-surface-2);
  color: var(--ds-text);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.sp-chipref i {
  font-size: 0.8em;
  color: var(--ds-text-3);
}

/* Avancement : Reçue → En cours → Réponse → Résolue */
.sp-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: var(--ds-space-6) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: sp-track;
}

.sp-track li {
  position: relative;
  padding-top: 30px;
  font-size: var(--ds-text-xs);
  font-weight: 600;
  color: var(--ds-text-3);
  text-align: center;
}

.sp-track li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--ds-surface);
  border: 3px solid var(--ds-border-strong);
  box-sizing: border-box;
}

.sp-track li::after {
  content: "";
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 4px;
  background: var(--ds-border);
}

.sp-track li:first-child::after {
  display: none;
}

.sp-track li.is-done,
.sp-track li.is-current {
  color: var(--ds-text);
}

.sp-track li.is-done::before {
  border-color: var(--ds-primary);
  background: var(--ds-primary);
}

.sp-track li.is-done::after,
.sp-track li.is-current::after {
  background: var(--ds-primary);
}

.sp-track li.is-current::before {
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 5px var(--ds-primary-soft);
}

/* Conversation */
.sp-thread {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-msg {
  display: flex;
  gap: var(--ds-space-3);
  max-width: 88%;
  animation: sp-step-in 320ms var(--ds-ease) both;
}

.sp-msg--user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.sp-msg__avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--ds-surface-2);
  color: var(--ds-text-2);
  font-weight: 700;
  font-size: var(--ds-text-sm);
  text-transform: uppercase;
}

.sp-msg--staff .sp-msg__avatar {
  background: var(--ds-primary);
  color: var(--ds-on-primary);
}

.sp-msg__body {
  min-width: 0;
}

.sp-msg__who {
  display: flex;
  align-items: baseline;
  gap: var(--ds-space-2);
  margin-bottom: 4px;
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

.sp-msg--user .sp-msg__who {
  justify-content: flex-end;
}

.sp-msg__who strong {
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
}

.sp-msg__bubble {
  padding: var(--ds-space-4) var(--ds-space-5);
  border-radius: 22px;
  border-top-left-radius: 8px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow-sm);
  color: var(--ds-text);
  overflow-wrap: anywhere;
}

.sp-msg--user .sp-msg__bubble {
  border-top-left-radius: 22px;
  border-top-right-radius: 8px;
  background: var(--ds-primary-soft);
  border-color: transparent;
  box-shadow: none;
}

.sp-msg__bubble p {
  margin: 0;
}

.sp-msg__bubble p + p {
  margin-top: 0.8em;
}

.sp-files {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-3);
}

.sp-msg--user .sp-files {
  justify-content: flex-end;
}

.sp-file {
  display: block;
  width: 120px;
  height: 90px;
  padding: 0;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ds-surface-2);
  cursor: zoom-in;
}

.sp-file img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-new-banner {
  margin-bottom: var(--ds-space-2);
}

.sp-divider {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

.sp-divider::before,
.sp-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ds-border);
}

/* Rédaction d'une réponse */
.sp-composer {
  margin-top: var(--ds-space-8);
  padding: var(--ds-space-5);
}

.sp-composer textarea {
  min-height: 120px;
}

.sp-composer__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-4);
}

.sp-composer .sp-drop {
  padding: 10px 14px;
}

.sp-composer .sp-drop__icon {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}

.sp-composer .sp-thumbs {
  margin-top: var(--ds-space-3);
}

.sp-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-3);
  margin-top: var(--ds-space-6);
  padding: var(--ds-space-4) var(--ds-space-5);
}

.sp-feedback p {
  margin: 0;
  font-weight: 600;
}

.sp-feedback form {
  display: flex;
  gap: var(--ds-space-2);
}

/* Colonne d'infos */
.sp-facts {
  padding: var(--ds-space-5);
}

.sp-facts dl {
  margin: var(--ds-space-3) 0 0;
}

.sp-facts dl > div {
  padding: 10px 0;
  border-top: 1px solid var(--ds-border);
}

.sp-facts dl > div:first-child {
  border-top: 0;
}

.sp-facts dt {
  font-size: var(--ds-text-xs);
  color: var(--ds-text-3);
}

.sp-facts dd {
  margin: 2px 0 0;
  font-size: var(--ds-text-sm);
  color: var(--ds-text);
  overflow-wrap: anywhere;
}

.sp-facts .ds-btn {
  width: 100%;
  margin-top: var(--ds-space-4);
}

.sp-keep {
  margin-top: var(--ds-space-4);
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-accent-soft);
  font-size: var(--ds-text-xs);
  color: var(--ds-text);
}

/* Visionneuse */
.sp-viewer {
  width: min(96vw, 1200px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--ds-radius-lg);
  background: transparent;
  overflow: visible;
}

.sp-viewer::backdrop {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(4px);
}

.sp-viewer img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  margin: 0 auto;
  border-radius: 18px;
}

.sp-viewer button {
  position: absolute;
  top: -14px;
  right: -6px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #1c1c1c;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--ds-shadow-md);
}

/* =================================================================
 * Mes demandes (/account/support)
 * ================================================================= */
.sp-list-empty {
  padding: var(--ds-space-10) var(--ds-space-6);
  text-align: center;
  color: var(--ds-text-2);
}

.sp-list-empty i {
  font-size: 2rem;
  color: var(--ds-text-3);
}

.sp-list-empty p {
  margin: var(--ds-space-3) 0 var(--ds-space-5);
}

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 960px) {
  .sp-layout,
  .sp-ticket {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-aside {
    position: static;
  }

  .sp-topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sp-shortcuts {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-hero::after {
    display: none;
  }

  .sp-topic {
    padding: 14px;
  }

  .sp-topic__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .sp-topic__text strong {
    font-size: var(--ds-text-sm);
  }

  .sp-progress__steps {
    justify-content: space-between;
    gap: var(--ds-space-2);
  }

  .sp-drop__more {
    display: none;
  }

  .sp-msg {
    max-width: 100%;
  }

  .sp-msg__avatar {
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  .sp-nav {
    flex-direction: column-reverse;
  }

  .sp-nav .ds-btn {
    width: 100%;
  }

  .sp-context .ds-hint {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp *,
  .sp *::before,
  .sp *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* L'en-tête du site est fixe : les ancres et défilements s'arrêtent dessous */
.sp-form,
.sp-success,
.sp-msg {
  scroll-margin-top: 120px;
}
