:root {
  --st-ink: #34222a;
  --st-ink-soft: #69545d;
  --st-navy: #64112f;
  --st-blue: #8a0038;
  --st-teal: #a20041;
  --st-mint: #f8e9ef;
  --st-coral: #d9534f;
  --st-gold: #f2bd3d;
  --st-paper: #ffffff;
  --st-cloud: #faf6f8;
  --st-line: #e4d3da;
  --st-success: #147753;
  --st-warning: #8b5b00;
  --st-danger: #a3332f;
  --st-radius: 14px;
  --st-shadow: 0 16px 40px rgba(80, 26, 49, 0.11);
  --st-font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  white-space: nowrap;
  width: 1px;
}

body.stetienne-portal-theme {
  background: var(--st-cloud);
  color: var(--st-ink);
  font-family: var(--st-font);
  font-size: 16px;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--st-blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--st-gold);
  outline-offset: 3px;
}

.st-container {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

.st-skip-link {
  background: var(--st-paper);
  border: 2px solid var(--st-ink);
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -100px;
  z-index: 1000;
}

.st-skip-link:focus {
  top: 16px;
}

.st-demo-ribbon {
  background: var(--st-ink);
  color: #fff;
  font-size: 0.82rem;
}

.st-demo-ribbon .st-container {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 32px;
}

.st-mode-indicator {
  color: #f5cadb;
}

.st-site-header {
  background: var(--st-paper);
  border-bottom: 1px solid var(--st-line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.st-header-main {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 88px;
}

.st-brand {
  align-items: center;
  color: var(--st-ink);
  display: inline-flex;
  gap: 18px;
  text-decoration: none;
}

.st-brand-logo-wrap {
  align-items: center;
  background: #fff;
  display: inline-flex;
  min-height: 58px;
  padding: 5px 8px;
}

.st-brand-logo {
  display: block;
  height: auto;
  max-height: 48px;
  width: 190px;
}

.st-portal-label {
  border-left: 1px solid var(--st-line);
  color: var(--st-ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  padding-left: 18px;
}

.st-primary-nav {
  align-items: center;
  display: flex;
  gap: 28px;
}

.st-primary-nav a {
  color: var(--st-ink);
  font-weight: 650;
  text-decoration: none;
}

.st-account-link {
  align-items: center;
  background: var(--st-navy);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  gap: 8px;
  padding: 10px 18px;
}

.st-main {
  min-height: 68vh;
}

.st-hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(227, 92, 146, 0.28), transparent 28%),
    linear-gradient(132deg, #4b1028 0%, #7b123d 58%, #a20041 100%);
  color: #fff;
  overflow: hidden;
  padding: 72px 0 80px;
  position: relative;
}

.st-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
  height: 340px;
  position: absolute;
  right: -80px;
  top: 44px;
  width: 340px;
}

.st-hero-grid {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  position: relative;
  z-index: 1;
}

.st-eyebrow {
  color: #f4c7d8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.st-hero h1,
.st-page-header h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
  margin: 0;
}

.st-hero p.st-lead {
  color: #f9e9ef;
  font-size: 1.15rem;
  max-width: 680px;
}

.st-search {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  display: flex;
  margin-top: 28px;
  max-width: 680px;
  padding: 8px;
}

.st-search input {
  border: 0;
  color: var(--st-ink);
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.st-search button,
.st-button {
  align-items: center;
  background: var(--st-blue);
  border: 1px solid transparent;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  padding: 12px 18px;
  text-decoration: none;
}

.st-search button:hover,
.st-button:hover {
  background: #70002d;
}

.st-button-secondary {
  background: #fff;
  border-color: var(--st-line);
  color: var(--st-ink);
}

.st-button-secondary:hover {
  background: var(--st-cloud);
}

.st-button-danger {
  background: var(--st-danger);
}

.st-quick-card {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--st-radius);
  padding: 26px;
}

.st-quick-card strong,
.st-quick-card span {
  display: block;
}

.st-quick-card strong {
  font-size: 1.08rem;
}

.st-quick-card span {
  color: #f6dce6;
  font-size: 0.9rem;
  margin-top: 5px;
}

.st-quick-card a {
  color: #fff;
  display: block;
  margin-top: 18px;
}

.st-section {
  padding: 64px 0;
}

.st-section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
}

.st-section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
}

.st-section-heading p {
  color: var(--st-ink-soft);
  margin: 8px 0 0;
}

.st-card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.st-service-card,
.st-case-card,
.st-panel {
  background: var(--st-paper);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  box-shadow: 0 8px 26px rgba(18, 38, 63, 0.05);
}

.st-service-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 26px;
  position: relative;
}

.st-service-card:hover {
  box-shadow: var(--st-shadow);
  transform: translateY(-2px);
  transition: 180ms ease;
}

.st-service-number {
  align-items: center;
  background: var(--st-mint);
  border-radius: 12px;
  color: var(--st-blue);
  display: inline-flex;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.st-service-card h3 {
  font-size: 1.3rem;
  line-height: 1.28;
  margin: 22px 0 8px;
}

.st-service-card p {
  color: var(--st-ink-soft);
  flex: 1;
}

.st-service-card a {
  font-weight: 800;
}

.st-reassurance {
  background: var(--st-paper);
  border-bottom: 1px solid var(--st-line);
  border-top: 1px solid var(--st-line);
}

.st-reassurance-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 26px;
  padding-top: 26px;
}

.st-reassurance-item {
  align-items: center;
  display: flex;
  gap: 14px;
}

.st-reassurance-item b {
  align-items: center;
  background: var(--st-mint);
  border-radius: 50%;
  color: var(--st-success);
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.st-page-header {
  background: linear-gradient(120deg, #fbf1f5, #fff);
  border-bottom: 1px solid var(--st-line);
  padding: 46px 0;
}

.st-page-header h1 {
  color: var(--st-ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.st-breadcrumbs {
  color: var(--st-ink-soft);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.st-breadcrumbs a {
  color: inherit;
}

.st-content-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.st-form-card,
.st-aside-card {
  background: var(--st-paper);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 28px;
}

.st-aside-card {
  align-self: start;
  position: sticky;
  top: 140px;
}

.st-aside-card h2,
.st-aside-card h3 {
  font-size: 1.05rem;
  margin-top: 0;
}

.st-aside-card ul {
  padding-left: 20px;
}

.st-stepper {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 30px;
}

.st-step {
  border-top: 4px solid var(--st-line);
  color: var(--st-ink-soft);
  font-size: 0.84rem;
  padding-top: 8px;
}

.st-step.is-active,
.st-step.is-complete {
  border-color: var(--st-teal);
  color: var(--st-ink);
  font-weight: 750;
}

.st-form-section {
  border: 0;
  margin: 0;
  padding: 0;
}

.st-form-section legend {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.st-field-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.st-field {
  margin-bottom: 18px;
}

.st-field label,
.st-field .st-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 6px;
}

.st-required {
  color: var(--st-danger);
}

.st-field input,
.st-field select,
.st-field textarea {
  background: #fff;
  border: 1px solid #9fb0bd;
  border-radius: 8px;
  color: var(--st-ink);
  padding: 12px 13px;
  width: 100%;
}

.st-field textarea {
  min-height: 118px;
  resize: vertical;
}

.st-field small {
  color: var(--st-ink-soft);
  display: block;
  margin-top: 5px;
}

.st-choice-list {
  display: grid;
  gap: 10px;
}

.st-choice {
  align-items: flex-start;
  border: 1px solid var(--st-line);
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.st-choice:hover {
  border-color: var(--st-teal);
}

.st-choice input {
  margin-top: 4px;
  width: auto;
}

.st-upload-zone {
  background: #f7fafb;
  border: 2px dashed #94a9b7;
  border-radius: 10px;
  padding: 22px;
  text-align: center;
}

.st-upload-zone input {
  margin: 10px auto 0;
  max-width: 420px;
}

.st-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.st-photo-preview:empty {
  display: none;
}

.st-photo-thumb {
  border: 1px solid var(--st-line);
  border-radius: 8px;
  height: 72px;
  overflow: hidden;
  width: 72px;
}

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

.st-photo-thumb-file {
  align-items: center;
  background: #fff;
  color: var(--st-ink-soft);
  display: flex;
  font-size: 0.68rem;
  justify-content: center;
  overflow-wrap: anywhere;
  padding: 6px;
  text-align: center;
}

.st-combobox {
  position: relative;
}

.st-combobox-listbox {
  background: #fff;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  box-shadow: var(--st-shadow);
  list-style: none;
  margin: 6px 0 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
}

.st-combobox-listbox[hidden] {
  display: none;
}

.st-combobox-listbox li {
  border-radius: 7px;
  cursor: pointer;
  padding: 10px 12px;
}

.st-combobox-listbox li:hover {
  background: var(--st-cloud);
}

.st-combobox-listbox li.is-active {
  background: var(--st-mint);
  box-shadow: inset 0 0 0 2px var(--st-gold);
}

.st-location-panel {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin: 4px 0 18px;
}

.st-location-map {
  background: var(--st-cloud);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  height: 240px;
  width: 100%;
  /* Leaflet's own panes and zoom controls use internal z-index values up to
     1000. Leaflet sets the map container to position:relative but leaves its
     z-index at "auto", so without a value here the map does not form its own
     stacking context and those internal z-indexes leak out and can paint over
     page UI (e.g. the address suggestion list) that sits later in the DOM.
     Setting an explicit z-index (any value, position is already set by
     Leaflet) traps everything inside the map at that single stacking level. */
  position: relative;
  z-index: 0;
}

.st-location-controls {
  background: var(--st-cloud);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.st-geoloc-status {
  color: var(--st-ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

.st-form-actions {
  align-items: center;
  border-top: 1px solid var(--st-line);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 20px;
}

.st-alert {
  border-left: 5px solid var(--st-blue);
  border-radius: 8px;
  margin: 18px 0;
  padding: 14px 16px;
}

.st-alert-info {
  background: #f8e8ee;
}

.st-alert-success {
  background: #e4f5ed;
  border-color: var(--st-success);
}

.st-alert-warning {
  background: #fff3d4;
  border-color: var(--st-warning);
}

.st-alert-error {
  background: #fdebea;
  border-color: var(--st-danger);
}

.st-summary-list {
  border: 1px solid var(--st-line);
  border-radius: 10px;
  margin: 0;
  overflow: hidden;
}

.st-summary-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 180px 1fr;
  padding: 12px 14px;
}

.st-summary-row:nth-child(even) {
  background: var(--st-cloud);
}

.st-summary-row dt {
  color: var(--st-ink-soft);
  font-weight: 650;
}

.st-summary-row dd {
  margin: 0;
}

.st-confirmation {
  background: var(--st-paper);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow);
  margin: 46px auto;
  max-width: 760px;
  padding: 38px;
  text-align: center;
}

.st-confirmation-icon {
  align-items: center;
  background: #def3e8;
  border-radius: 50%;
  color: var(--st-success);
  display: flex;
  font-size: 2rem;
  font-weight: 900;
  height: 72px;
  justify-content: center;
  margin: 0 auto 18px;
  width: 72px;
}

.st-reference {
  background: var(--st-cloud);
  border-radius: 8px;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 10px 14px;
}

.st-space-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.st-user-chip {
  align-items: center;
  display: flex;
  gap: 12px;
}

.st-avatar {
  align-items: center;
  background: var(--st-mint);
  border-radius: 50%;
  color: var(--st-blue);
  display: flex;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.st-case-list {
  display: grid;
  gap: 16px;
}

.st-case-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 22px;
}

.st-case-card h3 {
  font-size: 1.08rem;
  margin: 0 0 5px;
}

.st-case-meta {
  color: var(--st-ink-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.85rem;
  gap: 14px;
}

.st-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.st-status-received {
  background: #f7e5ec;
  color: #75002f;
}

.st-status-nouveau {
  background: #f7e5ec;
  color: #75002f;
}

.st-status-avis_attente {
  background: #fff0ca;
  color: #825500;
}

.st-status-piece_manquante {
  background: #fde3d8;
  color: #9a3412;
}

.st-status-generic {
  /* Repli pour un statut Case non encore reconnu par
     stetienne_case_status_slug() (voir inc/intalio-adapter.php). */
  background: #ececec;
  color: #4a4a4a;
}

.st-status-resolved {
  background: #def3e8;
  color: var(--st-success);
}

.st-status-waiting_user {
  background: #fff0ca;
  color: #825500;
}

.st-status-appointment_confirmed {
  background: #e8e5fa;
  color: #4f3e91;
}

.st-timeline {
  list-style: none;
  margin: 24px 0;
  padding: 0 0 0 8px;
}

.st-timeline li {
  border-left: 2px solid var(--st-line);
  padding: 0 0 22px 28px;
  position: relative;
}

.st-timeline li::before {
  background: #fff;
  border: 4px solid var(--st-teal);
  border-radius: 50%;
  content: "";
  height: 14px;
  left: -8px;
  position: absolute;
  top: 4px;
  width: 14px;
}

.st-timeline strong,
.st-timeline time {
  display: block;
}

.st-timeline time {
  color: var(--st-ink-soft);
  font-size: 0.82rem;
}

.st-slot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.st-slot {
  background: #fff;
  border: 1px solid var(--st-line);
  border-radius: 8px;
  color: var(--st-ink);
  cursor: pointer;
  padding: 11px;
}

.st-slot.is-selected {
  background: var(--st-navy);
  color: #fff;
}

.st-empty-state {
  background: #fff;
  border: 1px dashed #9fb0bd;
  border-radius: var(--st-radius);
  padding: 40px;
  text-align: center;
}

.st-site-footer {
  background: var(--st-ink);
  color: #fff;
  padding: 40px 0;
}

.st-footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.st-site-footer p {
  color: #e7ccd7;
  margin: 5px 0 0;
}

.st-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.st-site-footer a {
  color: #fff;
}

.st-loading {
  padding-bottom: 100px;
  padding-top: 100px;
  text-align: center;
}

@media (max-width: 860px) {
  .st-hero-grid,
  .st-content-grid,
  .st-card-grid {
    grid-template-columns: 1fr;
  }

  .st-quick-card,
  .st-aside-card {
    position: static;
  }

  .st-reassurance-grid {
    grid-template-columns: 1fr;
  }

  .st-primary-nav > a:not(.st-account-link) {
    display: none;
  }
}

@media (max-width: 620px) {
  .st-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .st-demo-ribbon .st-container {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 6px;
    padding-top: 6px;
  }

  .st-header-main {
    min-height: 76px;
  }

  .st-portal-label {
    display: none;
  }

  .st-brand-logo {
    width: 155px;
  }

  .st-account-link {
    font-size: 0.85rem;
    padding: 9px 12px;
  }

  .st-hero {
    padding: 50px 0;
  }

  .st-field-grid,
  .st-slot-grid,
  .st-summary-row,
  .st-case-card,
  .st-footer-grid,
  .st-location-panel {
    grid-template-columns: 1fr;
  }

  .st-location-map {
    height: 200px;
  }

  .st-form-card,
  .st-aside-card,
  .st-confirmation {
    padding: 20px;
  }

  .st-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .st-form-actions .st-button {
    width: 100%;
  }

  .st-site-footer nav {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
