/* ResidenceValue (residencevalue.com) — styles uniquement ; la logique interactive est dans les fichiers HTML */

:root {
  --bg: #0c1118;
  --bg-elevated: #141c28;
  --bg-card: #1a2332;
  --text: #e8ecf2;
  --text-muted: #94a3b8;
  --accent: #e8a54b;
  --accent-soft: rgba(232, 165, 75, 0.15);
  --accent-glow: rgba(232, 165, 75, 0.35);
  --border: rgba(148, 163, 184, 0.18);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 4px;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 17, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
  position: relative;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger (trois barres) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: var(--text-muted);
  background: var(--bg-muted);
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav en mode dropdown (caché par défaut) */
.nav--dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  flex-direction: column;
  gap: 0;
  padding: 1rem 0;
  margin-top: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s, opacity 0.2s, visibility 0.2s;
}

.nav--dropdown.is-open {
  max-height: 80vh;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
}

.nav--dropdown a {
  padding: 0.6rem 1.25rem;
  border-radius: 0;
}

.nav--dropdown a:hover {
  background: var(--accent-soft);
}

.nav--dropdown .lang-switcher {
  padding: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo__icon {
  flex-shrink: 0;
  color: var(--text);
}

.logo .logo__text span,
.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.lang-switcher button {
  padding: 0.35rem 0.6rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lang-switcher button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.lang-switcher button.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--small {
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
}

.btn--large {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

.btn--primary {
  background: linear-gradient(135deg, #f0b85c 0%, #d4923a 100%);
  color: #1a1208;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--block {
  width: 100%;
}

/* Hero */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 10%, rgba(232, 165, 75, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(100, 140, 200, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0a0e14 100%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.highlight {
  color: var(--accent);
  white-space: nowrap;
}

.lead {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38ch;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero__note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 32ch;
}

.hero__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.stat-card__value {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.stat-card__unit {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  align-self: end;
}

.stat-card__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__bullets {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero__bullets li {
  margin-bottom: 0.5rem;
}

.hero__bullets li::marker {
  color: var(--accent);
}

/* Sections */

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section--alt {
  background: var(--bg-elevated);
}

.section__head {
  text-align: center;
  margin-bottom: 3rem;
}

.section__head h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section__head--light p {
  opacity: 0.9;
}

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  border-radius: 50%;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Features */

.features {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature:hover {
  border-color: rgba(232, 165, 75, 0.35);
  transform: translateY(-2px);
}

.feature__icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Sources */

.section--sources {
  background: linear-gradient(160deg, #121a26 0%, #0c1118 100%);
  border-block: 1px solid var(--border);
}

.sources {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 560px;
  display: grid;
  gap: 1rem;
}

.sources li {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.sources strong {
  color: var(--text);
  font-weight: 600;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.sources-country {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sources-country strong {
  color: var(--text);
  font-weight: 600;
}

/* Form */

.section--form {
  padding-bottom: 4rem;
}

.form-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 880px) {
  .form-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.form-intro h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
}

.form-intro__text {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.trust-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.trust-list li {
  margin-bottom: 0.5rem;
}

.demo-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.field-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-footnote {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.4em;
}

.form-column {
  min-width: 0;
}

.form-block {
  margin: 0 0 1.75rem;
  padding: 0 0 1.5rem;
  border: none;
  border-bottom: 1px solid var(--border);
}

.form-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.form-block__title {
  padding: 0;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.field-hint {
  margin: -0.25rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.floor-plan-upload {
  margin: 0.5rem 0;
}
.floor-plan-upload__input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
}
.floor-plan-upload__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.floor-plan-upload__label:hover,
.floor-plan-upload__label:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.floor-plan-upload__text {
  font-size: 0.95rem;
  color: var(--text);
}
.floor-plan-upload__limit {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.floor-plan-upload__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.floor-plan-preview__thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.field-row--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .field-row--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem 1.25rem;
  margin-bottom: 1.25rem;
}

.check-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem 1rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
}

.check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.room-table {
  margin-bottom: 0.75rem;
}

.room-table__head {
  display: none;
  grid-template-columns: 1fr 120px 40px;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

@media (min-width: 520px) {
  .room-table__head {
    display: grid;
  }
}

.room-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

@media (min-width: 520px) {
  .room-row {
    grid-template-columns: 1fr 120px 40px;
  }
}

.room-row .room-type,
.room-row .room-area {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.room-row .room-type:focus,
.room-row .room-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-room-remove {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  justify-self: start;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-room-remove:hover {
  color: var(--accent);
  border-color: rgba(232, 165, 75, 0.45);
  background: var(--accent-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px dashed rgba(232, 165, 75, 0.45);
  margin-bottom: 0.5rem;
}

.btn--ghost:hover {
  background: var(--accent-soft);
  border-style: solid;
}

.field input[type="file"] {
  padding: 0.5rem 0;
  font-size: 0.88rem;
}

.demo-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 1rem;
}

.demo-loading__spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.demo-loading__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.demo-result {
  margin-top: 2rem;
  padding: 0;
  outline: none;
}

.demo-result__inner {
  background: var(--bg-card);
  border: 1px solid rgba(232, 165, 75, 0.28);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: var(--shadow);
}

.demo-result__badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border-radius: 6px;
}

.demo-result__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
}

.demo-result__grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 600px) {
  .demo-result__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.demo-result__stat {
  padding: 1rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.demo-result__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.demo-result__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.demo-result__value--accent {
  color: var(--accent);
  font-size: 1.35rem;
  font-family: var(--font-display);
}

.demo-result__section {
  margin-bottom: 1.35rem;
}

.demo-result__section h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.demo-result__section p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.demo-result__list,
.demo-result__comps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.demo-result__list li,
.demo-result__comps li {
  margin-bottom: 0.35rem;
}

.demo-result__two {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .demo-result__two {
    grid-template-columns: 1fr 1fr;
  }
}

.demo-result__two ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.demo-result__disclaimer {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.demo-result__method {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  background: rgba(232, 165, 75, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(232, 165, 75, 0.2);
}

.demo-result__exports {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.demo-result__exports h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.demo-result__plan {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.demo-result__export-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.demo-result__pdf-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.45;
}

/* Méthodologie */

.section--method {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.method-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .method-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.method-card {
  margin: 0;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.method-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.method-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.method-note {
  margin: 2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 62ch;
  margin-inline: auto;
  line-height: 1.5;
}

/* Abonnements */

.section--pricing {
  padding-bottom: 3.5rem;
}

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 960px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.price-card--featured {
  border-color: rgba(232, 165, 75, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.price-card--premium {
  border-color: rgba(180, 200, 230, 0.25);
  background: linear-gradient(165deg, #1c2638 0%, #1a2332 100%);
}

.price-card__badge {
  position: absolute;
  top: 0;
  right: 1.25rem;
  transform: translateY(-50%);
  margin: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
}

.price-card__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.price-card__for {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.price-card__amount {
  margin: 0 0 0.35rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
}

.price-card__currency {
  font-size: 1.25rem;
  vertical-align: super;
}

.price-card__period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.price-card__quota {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
}

.price-card__list {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.price-card__list li {
  margin-bottom: 0.45rem;
}

.price-card__footnote {
  margin: -0.5rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.price-card .btn--block + .btn--block {
  margin-top: 0.5rem;
}

.pricing-compare-link {
  margin: 1.5rem 0 0;
  text-align: center;
}

.link-arrow {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.link-arrow:hover {
  text-decoration: underline;
}

.pricing-legal {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin-inline: auto;
}

/* Page comparer les plans */

.page-compare .compare-main {
  min-height: 60vh;
}

.compare-hero {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.compare-hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
}

.compare-hero__lead {
  margin: 0 0 1rem;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.compare-hero__back {
  margin: 0;
  font-size: 0.9rem;
}

.compare-hero__back a {
  color: var(--text-muted);
}

.compare-hero__back a:hover {
  color: var(--accent);
}

.section--compare-table {
  padding-top: 1rem;
}

.compare-scroll {
  overflow-x: auto;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.compare-table__feature {
  width: 38%;
  min-width: 200px;
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--text);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table__plan--featured {
  background: rgba(232, 165, 75, 0.06);
  border-left: 1px solid rgba(232, 165, 75, 0.2);
  border-right: 1px solid rgba(232, 165, 75, 0.2);
}

.compare-table__plan--premium {
  background: rgba(140, 170, 210, 0.06);
}

.cell-yes {
  color: #7dd3a8;
  font-weight: 700;
}

.cell-no {
  color: var(--text-muted);
}

.compare-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.compare-footnote {
  margin: 0 auto;
  max-width: 52ch;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Page paiement (Stripe) */

.container--narrow {
  max-width: 520px;
}

.page-checkout .checkout-main {
  min-height: 50vh;
}

.checkout-hero {
  padding-bottom: 1rem;
}

.checkout-hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
}

.checkout-hero__lead {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 1rem;
}

.section--checkout-form {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

.checkout-form {
  margin-bottom: 2rem;
}

.checkout-plans {
  margin: 0 0 1.5rem;
  padding: 0;
  border: none;
}

.checkout-plans__legend {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0;
}

.checkout-plan {
  display: block;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.checkout-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-plan__box {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-plan input:focus-visible + .checkout-plan__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checkout-plan input:checked + .checkout-plan__box {
  border-color: rgba(232, 165, 75, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.checkout-plan__name {
  font-weight: 700;
  font-size: 1.05rem;
}

.checkout-plan__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
}

.checkout-plan__price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.checkout-plan__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.checkout-stripe-note {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius);
}

.checkout-stripe-note__title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #a5b4fc;
}

.checkout-stripe-note__text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkout-status {
  margin: 1rem 0 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--accent);
}

.checkout-direct-links {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkout-direct-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkout-direct-btns .btn {
  flex: 1;
  min-width: 140px;
}

.checkout-help {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.checkout-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.checkout-help ol {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.checkout-help li {
  margin-bottom: 0.5rem;
}

.checkout-help a {
  color: var(--accent);
}

.checkout-help code {
  font-size: 0.82em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.checkout-help__note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  font-style: italic;
}

.checkout-back {
  margin: 0;
  font-size: 0.9rem;
}

.checkout-back a {
  color: var(--text-muted);
}

.checkout-back a:hover {
  color: var(--accent);
}

/* Page guide (HTML) */

.page-guide .guide-main {
  min-height: 50vh;
}

.container--guide {
  max-width: 720px;
}

.guide-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-header__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
}

.guide-header__lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-block {
  margin-bottom: 2.5rem;
}

.guide-block h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--accent);
}

.guide-block h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.guide-block p,
.guide-block li {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.guide-block ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.guide-ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.guide-ol li {
  margin-bottom: 0.5rem;
}

.guide-block a {
  color: var(--accent);
}

.guide-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.guide-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.guide-table th,
.guide-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.guide-table thead th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text);
}

.guide-table tbody tr:last-child td {
  border-bottom: none;
}

.guide-table code {
  font-size: 0.9em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.guide-pre {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.45;
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.guide-pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #e2e8f0;
}

.guide-block--summary h2 {
  color: var(--text);
}

.guide-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  font-style: italic;
}

.guide-footer-meta {
  margin: 2rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.guide-back {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
}

.guide-back a {
  color: var(--accent);
}

/* Pages Connexion & Compte */

.page-connexion .connexion-main,
.page-compte .compte-main {
  min-height: 50vh;
}

.connexion-title,
.compte-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
}

.connexion-lead,
.compte-lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.connexion-error,
.connexion-success {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.connexion-error {
  background: rgba(220, 80, 80, 0.15);
  border: 1px solid rgba(220, 80, 80, 0.35);
  color: #f0a0a0;
}

.connexion-success {
  background: rgba(80, 200, 120, 0.15);
  border: 1px solid rgba(80, 200, 120, 0.35);
  color: #90e0b0;
}

.compte-profile {
  margin-bottom: 2rem;
}

.compte-profile__card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compte-profile__avatar-wrap {
  flex-shrink: 0;
}

.compte-profile__avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-muted);
}

.compte-profile__avatar-btn {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  cursor: pointer;
}

.compte-profile__avatar-btn:hover {
  text-decoration: underline;
}

.compte-profile__fields {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.compte-profile__fields .field input,
.compte-profile__fields .field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.compte-profile__fields textarea {
  resize: vertical;
  min-height: 4rem;
}

.compte-profile__status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.evaluation-login-gate {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.evaluation-login-gate__inner {
  max-width: 28rem;
  margin: 0 auto;
}

.evaluation-login-gate h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.evaluation-login-gate p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.connexion-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.connexion-tab {
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.connexion-tab:hover {
  color: var(--text);
}

.connexion-tab--active {
  color: var(--accent);
  border-color: rgba(232, 165, 75, 0.5);
  background: var(--accent-soft);
}

.connexion-form {
  margin-bottom: 1.5rem;
}

.connexion-form .field {
  margin-bottom: 1rem;
}

.connexion-back,
.compte-back {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.connexion-back a,
.compte-back a {
  color: var(--text-muted);
}

.connexion-back a:hover,
.compte-back a:hover {
  color: var(--accent);
}

.compte-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.compte-loading .demo-loading__spinner {
  margin: 0 auto 1rem;
}

.compte-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.compte-empty .btn {
  margin-top: 1rem;
}

.compte-error-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  word-break: break-word;
}

.compte-reports {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compte-report {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compte-report__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.compte-report__addr {
  font-size: 1rem;
  color: var(--text);
}

.compte-report__prov,
.compte-report__date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.compte-report__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
}

.compte-report__btn {
  margin-left: auto;
}

/* Sélection forfait formulaire */

.form-block--plan {
  border-bottom: none;
  padding-bottom: 0;
}

.plan-options {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 560px) {
  .plan-options {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan-option {
  display: flex;
  cursor: pointer;
}

.plan-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-option__box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-option input:focus-visible + .plan-option__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plan-option input:checked + .plan-option__box {
  border-color: rgba(232, 165, 75, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.plan-option__box strong {
  font-size: 0.95rem;
  color: var(--text);
}

.plan-option__box span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Impression PDF (Premium) */

@media print {
  body.print-report .skip-link,
  body.print-report .site-header,
  body.print-report .site-footer,
  body.print-report #contenu-principal > section:not(#evaluation) {
    display: none !important;
  }

  body.print-report #evaluation .form-layout,
  body.print-report #evaluation .form-intro,
  body.print-report #demo-loading,
  body.print-report #form-status {
    display: none !important;
  }

  body.print-report {
    background: #fff !important;
  }

  body.print-report #demo-result {
    display: block !important;
    color: #111 !important;
  }

  body.print-report .demo-result__inner {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  body.print-report .demo-result__value,
  body.print-report .demo-result__title,
  body.print-report h4 {
    color: #111 !important;
  }

  body.print-report .demo-result__badge {
    background: #333 !important;
    color: #fff !important;
  }

  body.print-report .demo-result__exports,
  body.print-report .demo-result__disclaimer {
    display: none !important;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  background: #080b10;
}

.footer-inner {
  text-align: center;
}

.footer__brand {
  margin: 0 0 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer__brand a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer__brand a:hover {
  text-decoration: underline;
}

.footer__nav {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.footer__nav a {
  color: var(--accent);
  text-decoration: none;
}

.footer__nav a:hover {
  text-decoration: underline;
}

.footer__legal {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Magasin */

.page-magasin .magasin-main {
  min-height: 50vh;
}

.magasin-hero {
  padding-bottom: 1.5rem;
}

.magasin-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.magasin-hero__lead {
  color: var(--text-muted);
  max-width: 42rem;
}

.magasin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.magasin-loading,
.magasin-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.magasin-loading .demo-loading__spinner {
  margin: 0 auto 0.5rem;
}

.magasin-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.magasin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow 0.2s;
}

.magasin-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.magasin-card__map {
  height: 140px;
  background: var(--bg-muted);
}

.magasin-card__body {
  padding: 1rem;
}

.magasin-card__addr {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.magasin-card__region,
.magasin-card__price {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.magasin-card__price {
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-display);
}

.magasin-detail__title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.magasin-detail__region {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.magasin-detail__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
}

.magasin-detail__est,
.magasin-detail__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.magasin-detail__own {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.magasin-detail__seller {
  margin-top: 1rem;
}

.magasin-seller {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
}

.magasin-seller__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.magasin-seller__name {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.magasin-seller__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal__content {
  position: relative;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}

.modal__close:hover {
  color: var(--text);
}

.message-form-wrap {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.message-form-wrap h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message-form textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.message-form__hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Messages */

.page-messages .messages-main {
  min-height: 50vh;
}

.messages-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 0.5rem;
}

.messages-lead {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.messages-loading {
  text-align: center;
  padding: 2rem;
}

.messages-loading .demo-loading__spinner {
  margin: 0 auto 0.5rem;
}

.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.messages-thread-wrap,
.messages-placeholder {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
}

@media (max-width: 767px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-thread-wrap,
  .messages-placeholder {
    grid-column: 1;
  }

  .messages-placeholder {
    display: none;
  }
}

.messages-sidebar {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

@media (max-width: 767px) {
  .messages-sidebar--hidden {
    display: none;
  }
}

.messages-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.messages-conversations {
  list-style: none;
  margin: 0;
  padding: 0;
}

.messages-conv {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.messages-conv:hover {
  background: var(--bg-muted);
}

.messages-conv--unread {
  background: var(--accent-soft);
}

.messages-conv__addr {
  font-weight: 600;
  font-size: 0.95rem;
}

.messages-conv__preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-conv__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.messages-conv__badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.messages-conv {
  position: relative;
}

.messages-placeholder {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.messages-thread-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (max-width: 767px) {
  .messages-thread-wrap {
    position: absolute;
    inset: 0;
    background: var(--bg);
    z-index: 2;
  }

  .messages-thread-wrap--active {
    display: flex !important;
  }
}

.messages-thread-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.messages-back {
  display: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--accent);
}

@media (max-width: 767px) {
  .messages-back {
    display: block;
  }
}

.messages-thread-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.messages-thread-link {
  font-size: 0.85rem;
  color: var(--accent);
}

.messages-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.messages-bubble {
  max-width: 85%;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  align-self: flex-start;
}

.messages-bubble--me {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--text);
}

.messages-bubble--them {
  background: var(--bg-muted);
}

.messages-bubble__text {
  margin: 0 0 0.25rem;
}

.messages-bubble__time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.messages-reply-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.messages-reply-form textarea {
  flex: 1;
  min-height: 60px;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
}

.messages-back-link {
  margin-top: 1.5rem;
}

.messages-back-link a {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .nav--dropdown {
    left: -1.25rem;
    right: -1.25rem;
    margin-left: 0;
    margin-right: 0;
  }
}
