/* ALLO AVOCAT : crème chaud, noir brun et or.
   Titres en Inter Tight, texte en Inter, boutons et champs en pilule,
   listes "libellé · valeur" séparées par un filet, dégradé noir → or → crème pour les écrans d'accueil.
   Aucune ombre portée. Mobile d'abord ; les propriétés "inline" s'inversent seules en arabe. */
:root {
  /* Couleurs */
  --page: #f4f0e6; /* fond crème */
  --card: #ebe6d9; /* blocs posés sur le fond */
  --card-hover: #e4dece;
  --field: #fcfaf5; /* champs et pilules claires */
  --black: #231f1c; /* noir brun : texte fort, boutons */
  --black-hover: #3a3430;
  --ink: #231f1c;
  --ink-muted: #75706a;
  --line: #ddd6c6;
  --gold: #e2b43a; /* or vif : pastilles actives, repères */
  --gold-deep: #a8841c; /* or foncé : contours, dégradés */
  --gold-text: #6a520c; /* or lisible pour du texte */
  --gold-soft: #f3e6c0;

  /* États */
  --success-bg: #e3eedf;
  --success: #2f6a3a;
  --warning-bg: #f6e9c8;
  --warning: #6e5208;
  --error-bg: #f6e0dc;
  --error: #9b2620;
  --urgent: #c8453b;
  --urgent-dark: #a9372f;
  --online: #3f8f55;

  /* Formes */
  --radius: 28px;
  --radius-md: 20px;
  --pill: 999px;

  /* Typographie */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-title: 'Inter Tight', 'Inter', 'Helvetica Neue', Arial, sans-serif;

  font-family: var(--font-body);
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Arabe : Tajawal, une police conçue pour l'écriture arabe */
:root[lang='ar'] {
  --font-body: 'Tajawal', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif;
  --font-title: 'Tajawal', 'Noto Sans Arabic', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  overflow-x: clip;
}

a {
  color: var(--gold-text);
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
  color: var(--ink);
}
:root[lang='ar'] :is(h1, h2, h3) {
  letter-spacing: 0;
  line-height: 1.45;
}
h1 {
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
}
h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}
h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

/* Petit texte d'introduction au-dessus d'un titre */
.eyebrow {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

/* Un élément marqué "hidden" reste caché, même si une règle lui donne un affichage. */
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Barre du haut ---------- */
.topbar {
  background: var(--page);
  padding-top: env(safe-area-inset-top, 0px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--black);
  color: var(--gold);
}
.brand-mark svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 400px) {
  .topbar .brand > span:last-child {
    display: none;
  }
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Pilules de la barre du haut (langue, connexion) */
.top-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--field);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.top-pill:hover {
  background: var(--card);
}
.top-pill.is-dark {
  background: var(--black);
  border-color: var(--black);
  color: var(--page);
}
.top-pill.is-dark:hover {
  background: var(--black-hover);
}

.container {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
}

.footer {
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.footer p {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem 1.3rem;
  margin-block-end: 0.75rem;
}
.card a:not(.btn) {
  font-weight: 600;
}
/* Carte sombre avec lueur dorée en bas (ex. avocat en ligne) */
.card-dark {
  color: var(--page);
  background:
    radial-gradient(120% 70% at 50% 120%, rgba(226, 180, 58, 0.55), transparent 60%),
    var(--black);
}
.card-dark :is(h1, h2, h3) {
  color: var(--page);
}
.card-dark .muted {
  color: #c9c1b2;
}
.center {
  text-align: center;
}
.muted {
  color: var(--ink-muted);
}

/* ---------- Formulaires ---------- */
form {
  display: grid;
  gap: 1.1rem;
}
fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
legend {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin-block-end: 0.6rem;
  padding: 0;
}
.card fieldset + fieldset {
  border-block-start: 1px solid var(--line);
  padding-block-start: 1.2rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field > span {
  font-size: 0.9rem;
  font-weight: 500;
  padding-inline-start: 0.4rem;
}
.field small {
  color: var(--ink-muted);
  padding-inline-start: 0.4rem;
}
/* Champs en pilule, sans contour, comme sur la maquette */
input[type='email'],
input[type='password'],
input[type='text'],
input[type='tel'],
input:not([type]),
select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  min-height: 52px;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: var(--field);
  color: var(--ink);
}
input::placeholder {
  color: #9e978c;
}
input[type='file'] {
  font: inherit;
  max-width: 100%;
  padding: 0.6rem 0.4rem;
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--gold-deep);
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--black);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}
.check input {
  margin-block-start: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.checks {
  display: grid;
  gap: 0.55rem;
}
@media (min-width: 480px) {
  .checks {
    grid-template-columns: 1fr 1fr;
  }
}
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.segmented legend {
  width: 100%;
}
.segmented label,
.choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: var(--field);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.segmented label {
  flex: 1 1 10rem;
}
.segmented label:has(input:checked),
.choice:has(input:checked) {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
.choice-list {
  display: grid;
  gap: 0.5rem;
}
.choice input {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* ---------- Boutons : pilules ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 600;
  min-height: 52px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-small {
  min-height: 40px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
}
.btn-lg {
  min-height: 58px;
  font-size: 1.02rem;
}
.btn-block {
  width: 100%;
}
/* Principal : noir brun, texte crème (comme "Let's get Started") */
.btn-primary,
.btn-dark {
  background: var(--black);
  color: var(--page);
}
.btn-primary:hover:not(:disabled),
.btn-dark:hover:not(:disabled) {
  background: var(--black-hover);
}
/* Clair (comme "View All Investment") */
.btn-light {
  background: var(--card);
  color: var(--ink);
}
.btn-light:hover:not(:disabled) {
  background: var(--card-hover);
}
.card .btn-light {
  background: var(--field);
}
/* Or (comme "Check Now") */
.btn-gold {
  background: var(--gold);
  color: var(--black);
}
.btn-gold:hover:not(:disabled) {
  background: #d6a72c;
}
/* Contour */
.btn-secondary,
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover:not(:disabled),
.btn-outline:hover {
  background: rgba(35, 31, 28, 0.06);
}
.card-dark .btn-secondary {
  color: var(--page);
  border-color: rgba(244, 240, 230, 0.5);
}
.card-dark .btn-secondary:hover:not(:disabled) {
  background: rgba(244, 240, 230, 0.1);
}
.btn-link {
  background: none;
  border: none;
  padding: 0.25rem;
  font: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Messages ---------- */
.alert {
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-block: 0.5rem;
}
.alert ul {
  margin: 0.4rem 0 0;
  padding-inline-start: 1.2rem;
}
.alert-error {
  background: var(--error-bg);
  color: var(--error);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
}
.alert-warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.tech {
  margin-block-start: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.85;
}
.tech code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  direction: ltr;
  text-align: start;
}

.badge {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--pill);
}
.badge-success {
  background: var(--success-bg);
  color: var(--success);
}
.badge-warning {
  background: var(--gold);
  color: var(--black);
}
.badge-error {
  background: var(--error-bg);
  color: var(--error);
}

/* ---------- Chargement ---------- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  color: var(--ink-muted);
}
.spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Carte du cabinet (formulaire avocat) ---------- */
.map {
  height: 260px;
  border-radius: var(--radius-md);
  margin-block-start: 0.4rem;
  z-index: 0;
}
.leaflet-bar,
.leaflet-control-layers,
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  box-shadow: none !important;
}
.leaflet-touch .leaflet-bar {
  border: none !important;
  border-radius: 14px !important;
  overflow: hidden;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: 0.5rem;
}

/* ---------- Listes "libellé · valeur" (comme "Overview") ---------- */
.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
}
.summary dt,
.summary dd {
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--line);
}
.summary dt {
  color: var(--ink);
}
.summary dd {
  margin: 0;
  text-align: end;
  color: var(--ink-muted);
  word-break: break-word;
}
.summary dt:last-of-type,
.summary dd:last-of-type {
  border-block-end: none;
}
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: grid;
}
.doc-list li {
  display: grid;
  padding-block: 0.75rem;
  border-block-end: 1px solid var(--line);
  word-break: break-all;
}
.doc-list li:last-child {
  border-block-end: none;
}

/* ---------- Disponibilité de l'avocat ---------- */
.avail-state {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-title);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}
.avail-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #a8a196;
  flex-shrink: 0;
}
.avail-state.is-online .avail-dot {
  background: #6fcf8a;
}
.small-print {
  font-size: 0.82rem;
  margin: 0.75rem 0 0;
}

/* ---------- Demande de rappel ---------- */
.back-to-map {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-block-end: 0.75rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.privacy-note {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--gold-soft);
}

/* ---------- Suivi de la demande ---------- */
.status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.status-top h1 {
  margin: 0;
}
.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0 0.85rem;
  border-radius: var(--pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--black);
  background: var(--gold);
}
.status-meta {
  margin: 0.9rem 0;
  color: var(--ink-muted);
}
.steps-track {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  counter-reset: step;
}
.steps-track li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-muted);
}
.steps-track li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--field);
}
.steps-track li.is-done {
  color: var(--ink);
}
.steps-track li.is-done::before {
  content: '✓';
  background: var(--black);
  color: var(--gold);
}
.steps-track li.is-current {
  color: var(--ink);
  font-weight: 600;
}
.steps-track li.is-current::before {
  background: var(--gold);
  color: var(--black);
}
.status-lead {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
}
.countdown {
  margin: 0 0 1rem;
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

/* ---------- Écran d'accueil : choix de la langue ---------- */
/* Dégradé noir → or → crème, comme l'écran "Simplify with a Smarter Card" */
.lang-picker {
  display: grid;
  gap: 1.5rem;
  margin: -1rem -1rem 0;
}
.lang-hero {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1.25rem;
  min-height: 300px;
  padding: 3rem 1.5rem 0;
  background: linear-gradient(180deg, var(--black) 0%, var(--black) 42%, #7a5f1e 68%, #d8b45a 84%, var(--page) 100%);
}
.lang-hero .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(244, 240, 230, 0.1);
}
.lang-hero .brand-mark svg {
  width: 28px;
  height: 28px;
}
.lang-content {
  display: grid;
  gap: 1.25rem;
  padding: 0 1.5rem 1rem;
}
.lang-title {
  margin: 0;
  display: grid;
  gap: 0.2rem;
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
}
.lang-title [lang='ar'] {
  font-family: 'Tajawal', 'Noto Sans Arabic', Tahoma, sans-serif;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.85em;
  line-height: 1.4;
}
.lang-intro {
  margin: 0;
  color: var(--ink-muted);
}
.lang-options {
  display: grid;
  gap: 0.6rem;
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--pill);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s;
}
.lang-option strong {
  font-size: 1.1rem;
  font-weight: 600;
}
.lang-option small {
  font-size: 0.82rem;
  opacity: 0.75;
}
.lang-option.is-dark {
  background: var(--black);
  color: var(--page);
}
.lang-option.is-dark:hover {
  background: var(--black-hover);
}
.lang-option.is-light {
  background: var(--card);
  color: var(--ink);
}
.lang-option.is-light:hover {
  background: var(--card-hover);
}
.lang-option[lang='ar'] {
  font-family: 'Tajawal', 'Noto Sans Arabic', Tahoma, sans-serif;
}
.lang-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
}
.lang-note [lang='ar'] {
  font-family: 'Tajawal', 'Noto Sans Arabic', Tahoma, sans-serif;
}
@media (min-width: 640px) {
  .lang-picker {
    margin: 1rem 0 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--page);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}

/* ================= Version application (téléphone) ================= */

/* Comportement d'application : pas de zoom au double appui, pas de flash gris au toucher. */
body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button,
.btn,
.tab,
.chip {
  -webkit-user-select: none;
  user-select: none;
}

/* En-tête d'application : flèche retour + titre (téléphone uniquement) */
.appbar {
  display: none;
}
.appbar-back,
.appbar-spacer {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.appbar-back {
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--field);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
:root[dir='rtl'] .appbar-back span {
  display: inline-block;
  transform: scaleX(-1);
}
.appbar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Barre d'onglets en bas */
.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-around;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--page);
  border-block-start: 1px solid var(--line);
}
.tab {
  flex: 1;
  max-width: 140px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}
.tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.is-active {
  color: var(--ink);
}
.tab.is-active svg {
  color: var(--gold-deep);
}

@media (max-width: 899px) {
  .topbar-inner {
    display: none;
  }
  .appbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  body.is-fullscreen .topbar {
    display: none;
  }
  .footer {
    display: none;
  }
  .container {
    padding-top: 0.5rem;
  }
}
@media (min-width: 900px) {
  .tabbar {
    display: none !important;
  }
}

/* Titre d'un onglet (Mes demandes, Compte) */
.page-title {
  margin: 0.5rem 0.25rem 1rem;
  font-size: 2rem;
}
@media (max-width: 899px) {
  /* Sur téléphone, le titre est déjà dans l'en-tête d'application */
  .page-title {
    display: none;
  }
}

/* ---------- Mes demandes ---------- */
.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.request-row:hover {
  background: var(--card-hover);
}
.request-main {
  display: grid;
  min-width: 0;
}
.request-main strong {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 500;
}
.request-main small {
  color: var(--ink-muted);
}
.badge-neutral {
  background: var(--field);
  color: var(--ink-muted);
}
.empty-state {
  text-align: center;
  display: grid;
  gap: 0.75rem;
}
.empty-state h1 {
  margin: 0;
}

/* ---------- Compte ---------- */
.lang-switch {
  display: flex;
  gap: 8px;
}
.lang-switch .chip {
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.lang-switch .chip.is-on {
  background: var(--black);
  border-color: var(--black);
  color: var(--page);
}
.lang-switch .chip[lang='ar'] {
  font-family: 'Tajawal', 'Noto Sans Arabic', Tahoma, sans-serif;
}

/* ---------- Fenêtre "Installer l'application" ---------- */
.install-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 28, 0.45);
  animation: fade-in 0.2s ease;
}
.install-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: center;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--black) 0, var(--black) 64px, #7a5f1e 104px, #d8b45a 128px, var(--page) 156px);
  animation: slide-up 0.25s ease;
}
.install-icon {
  border-radius: 18px;
  outline: 4px solid var(--page);
}
.install-dialog h2 {
  margin: 4px 0 0;
  font-size: 1.6rem;
}
.install-dialog p {
  margin: 0;
}
.install-steps {
  justify-self: stretch;
  margin: 0;
  padding: 0.9rem 1.1rem 0.9rem 2.2rem;
  border-radius: var(--radius-md);
  background: var(--card);
  text-align: start;
  display: grid;
  gap: 0.4rem;
}
:root[dir='rtl'] .install-steps {
  padding: 0.9rem 2.2rem 0.9rem 1.1rem;
}
.install-dialog .btn {
  justify-self: stretch;
}
@media (min-width: 900px) {
  .install-popup {
    align-items: center;
  }
  .install-dialog {
    border-radius: var(--radius);
  }
}
@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .install-dialog,
  .install-backdrop {
    animation: none;
  }
}
/* ================= Tableau de bord de l'avocat ================= */
.dash-section {
  display: grid;
  gap: 0.6rem;
  margin-block: 1.4rem;
}
.dash-section > h2 {
  margin: 0 0.25rem;
}
.empty-line {
  margin: 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--card);
}
/* Demande reçue : carte bien visible, bordure or (rouge si urgente) */
.offer-card {
  display: grid;
  gap: 0.6rem;
  padding: 1.2rem 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: var(--field);
  border: 2px solid var(--gold-deep);
  animation: offer-in 0.3s ease;
}
.offer-card.is-urgent {
  border-color: var(--urgent);
}
.offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.offer-head h3 {
  margin: 0;
  font-size: 1.35rem;
}
.offer-card p {
  margin: 0;
}
.offer-timer strong {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.offer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.badge-urgent {
  background: var(--urgent);
  color: #ffffff;
}
@keyframes offer-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}
/* Mise en relation en cours : carte sombre avec le numéro du client */
.contact-card {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}
.contact-card h3 {
  margin: 0;
  font-size: 1.3rem;
}
.contact-card p {
  margin: 0;
}
.contact-phone {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--gold);
  text-align: start;
}
/* Statistiques : grands chiffres */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}
.stat {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--card);
}
.stat-value {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
}
/* Historique : lignes séparées par un filet */
.history-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--card);
}
.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.8rem;
  border-block-end: 1px solid var(--line);
}
.history-list li:last-child {
  border-block-end: none;
}
@media (prefers-reduced-motion: reduce) {
  .offer-card {
    animation: none;
  }
}

/* ================= Administration ================= */
.btn-danger {
  background: var(--urgent);
  color: #ffffff;
}
.btn-danger:hover:not(:disabled) {
  background: var(--urgent-dark);
}
/* Alerte "dossiers à vérifier" en tête du tableau de bord */
.admin-alert {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-decoration: none;
}
.admin-alert .stat-value {
  color: var(--gold);
}
.admin-alert > span:nth-child(2) {
  flex: 1;
  min-width: 10rem;
}
/* Filtres par statut (pilules, la sélection en noir) */
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-block-end: 1rem;
  padding-block: 2px;
}
.filter-tabs::-webkit-scrollbar {
  display: none;
}
.filter-tabs .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--field);
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}
.filter-tabs .chip.is-on {
  background: var(--black);
  border-color: var(--black);
  color: var(--page);
  font-weight: 600;
}
.chip-count {
  min-width: 1.5rem;
  padding: 0 0.4rem;
  border-radius: var(--pill);
  font-size: 0.78rem;
  text-align: center;
  background: var(--card);
  color: var(--ink);
}
.chip.is-on .chip-count {
  background: var(--gold);
  color: var(--black);
}
.lawyer-admin-row .request-main {
  gap: 0.1rem;
}
.row-chevron {
  font-size: 1.6rem;
  color: var(--ink-muted);
}
:root[dir='rtl'] .row-chevron {
  transform: scaleX(-1);
}
/* Pièces justificatives */
.doc-item {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
}
.doc-preview {
  grid-column: 1 / -1;
}
.doc-image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--field);
}

/* Fenêtre de confirmation */
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 0.8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--field);
  color: var(--ink);
  resize: vertical;
}
textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
}
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 28, 0.45);
}
.dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: 0.9rem;
  padding: 26px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--page);
  color: var(--ink);
  animation: slide-up 0.25s ease;
}
.dialog .dialog-overlay textarea,
.dialog textarea {
  background: var(--card);
}
.dialog h2,
.dialog p {
  margin: 0;
}
.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
@media (min-width: 900px) {
  .dialog-overlay {
    align-items: center;
  }
  .dialog {
    border-radius: var(--radius);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dialog {
    animation: none;
  }
}

/* ---------- Divers ---------- */
/* Titre de carte avec un bouton à droite */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.5rem;
}
.card-head h2 {
  margin: 0;
}
.account-actions {
  display: grid;
  gap: 0.5rem;
  margin-block-end: 0.5rem;
}

/* ---------- Pages légales ---------- */
.legal {
  line-height: 1.65;
}
.legal h2 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.15rem;
}
.legal ul {
  padding-inline-start: 1.2rem;
  display: grid;
  gap: 0.4rem;
}
.legal p,
.legal li {
  max-width: 68ch;
}
mark.to-fill {
  padding: 0 0.25rem;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--gold-text);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-block: 0.75rem;
  font-size: 0.82rem;
}
.legal-links a {
  color: var(--ink-muted);
}

/* Écran de langue : chaque langue sur sa ligne, l'arabe aligné à droite */
.lang-intro span,
.lang-note span {
  display: block;
}
.lang-intro [lang='ar'] {
  text-align: right;
}
.lang-option small {
  text-align: end;
}

/* ---------- Abonnement ---------- */
.sub-price {
  margin: 0 0 0.75rem;
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 500;
}

/* ---------- Signalements ---------- */
.report-link {
  display: block;
  margin: 0.5rem auto 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.report-card {
  display: grid;
  gap: 0.5rem;
}
.report-card p {
  margin: 0;
}
.report-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--field);
  white-space: pre-wrap;
}
.admin-reports-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.admin-reports-link > span:nth-child(2) {
  flex: 1;
}
