/* =========================================================
   LNC FINANCES : feuille de style unique
   ========================================================= */

:root {
  --green: #0F3D3E;
  --green-dark: #0A2B2C;
  --green-soft: #E3ECE9;
  --ivory: #F7F4EE;
  --sand: #EEE8DA;
  --white: #FFFFFF;
  --brass: #B8893B;
  --brass-text: #8A6420;
  --ink: #1D2A2A;
  --muted: #56625F;
  --line: #DDD6C6;
  --danger: #B3261E;
  --radius: 6px;
  --maxw: 1180px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
h1, h2, h3 {
  margin: 0 0 .6em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green);
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: .75rem 1rem; background: var(--green); color: var(--ivory);
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 760px; }

/* ---------- Typographie utilitaire ---------- */
.eyebrow {
  margin: 0 0 1rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass-text);
}
.lead { max-width: 60ch; font-size: 1.15rem; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.5rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--green); color: var(--ivory); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: transparent; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--green); color: var(--ivory); }
.btn-light { background: var(--ivory); color: var(--green); }
.btn-light:hover { background: var(--white); }
.btn-sm { padding: .6rem 1.05rem; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ivory); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--green); }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: .06em; }
.brand-sub { margin-top: .32rem; font-size: .62rem; font-weight: 700; letter-spacing: .34em; color: var(--brass-text); }
.brand--light { color: var(--ivory); }
.brand--light .brand-sub { color: #D9B26B; }

.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  display: block; padding: .5rem .85rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 500; color: var(--ink);
}
.primary-nav a:hover { background: var(--sand); }
.primary-nav a[aria-current="page"] { background: var(--green-soft); color: var(--green); font-weight: 700; }
.nav-client { display: none; }

.header-actions { display: flex; align-items: center; gap: .75rem; }

/* Sélecteur de langue (globe) */
.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; gap: .45rem; list-style: none; cursor: pointer;
  padding: .5rem .75rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--green); font-size: .85rem; font-weight: 700;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { border-color: var(--green); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 190px; margin: 0; padding: .35rem; list-style: none;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 61, 62, .12);
}
.lang-list a {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem .7rem; border-radius: 4px; font-size: .92rem; color: var(--ink);
}
.lang-list a:hover { background: var(--sand); }
.lang-list a[aria-current="true"] { color: var(--green); font-weight: 700; background: var(--green-soft); }
.lang-code { font-size: .78rem; color: var(--muted); }

/* Bouton menu mobile */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--green); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--sand { background: var(--sand); }
.section--green { background: var(--green); color: var(--ivory); }
.section--green h2, .section--green h3 { color: var(--ivory); }
.section--green p { color: #D3DFDB; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }

.page-hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0; background: var(--sand); }
.page-hero h1 { margin-bottom: .4em; }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Grilles ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.media { width: 100%; aspect-ratio: 7 / 5; object-fit: cover; border-radius: var(--radius); background: var(--sand); }

/* ---------- Accueil ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); background: var(--sand); }

.step { padding: 1.75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; margin-bottom: 1rem; border-radius: 50%;
  background: var(--green); color: var(--ivory); font-family: var(--font-head); font-weight: 700;
}
.step p { margin: 0; color: var(--muted); }

.why h3 { margin-bottom: .4em; }
.why p { margin: 0; }

.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }
.cta-band p { margin-inline: auto; max-width: 52ch; }

/* ---------- Cartes de crédit ---------- */
.card { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.card__body { padding: 1.5rem; }
.loan-card { display: flex; flex-direction: column; }
.loan-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sand); }
.loan-card .card__body { display: flex; flex: 1; flex-direction: column; }
.loan-card p { color: var(--muted); font-size: .95rem; }
.facts { display: grid; gap: .5rem; margin: .5rem 0 1.5rem; font-size: .9rem; }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.loan-card .btn { align-self: flex-start; margin-top: auto; }
.note { margin-top: 2rem; font-size: .9rem; color: var(--muted); }

/* ---------- Valeurs et informations ---------- */
.value { padding-top: 1.25rem; border-top: 3px solid var(--brass); }
.value p { margin: 0; color: var(--muted); }

.info-card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.info-list { display: grid; gap: .9rem; margin: 0; }
.info-list > div { display: grid; grid-template-columns: 190px 1fr; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.info-list dt { color: var(--muted); font-size: .92rem; }
.info-list dd { margin: 0; font-weight: 600; }
.info-list a { color: var(--green); }

/* ---------- FAQ ---------- */
.faq details { margin-bottom: .75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 1.15rem 3.25rem 1.15rem 1.35rem; font-weight: 600; color: var(--green);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.35rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--brass-text);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 1.35rem 1.35rem; color: var(--muted); }

/* ---------- Formulaires ---------- */
.form-card { padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .4rem; font-size: .92rem; font-weight: 600; }
.input, .textarea, .select {
  width: 100%; padding: .8rem .9rem;
  border: 1px solid #BFB8A6; border-radius: var(--radius);
  background: var(--white); color: var(--ink); font: inherit;
}
.textarea { min-height: 160px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brass); outline: 3px solid rgba(184, 137, 59, .35); outline-offset: 0; }
.is-invalid { border-color: var(--danger); }
.field-error { margin: .35rem 0 0; font-size: .88rem; color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: .7rem; font-size: .92rem; }
.check input { margin-top: .3rem; accent-color: var(--green); }
.check a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { margin: 1.25rem 0; padding: 1rem 1.25rem; border: 1px solid; border-radius: var(--radius); }
.alert-success { background: #E6F3EB; border-color: #9CCDB0; color: #14532D; }
.alert-error { background: #FBEAE8; border-color: #E3A39E; color: #7A1A14; }
.flash-zone { padding-top: 1rem; }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-grid .media { margin-bottom: 1.75rem; aspect-ratio: 3 / 2; }

/* ---------- Simulateur ---------- */
.sim { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
.range-row { display: grid; grid-template-columns: 1fr 160px; gap: 1rem; align-items: center; }
input[type="range"] { width: 100%; accent-color: var(--green); }
.rate-row { display: flex; align-items: center; gap: 1rem; }
.rate-row output { min-width: 5.5rem; font-weight: 700; text-align: right; color: var(--green); }
.field-hint { margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }

.sim-result {
  position: sticky; top: 100px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--green); color: var(--ivory); border-radius: var(--radius);
}
.sim-result__label { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #BCD0CB; }
.sim-result__value { margin: .3rem 0 0; font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.1; }
.sim-result__unit { margin: 0; color: #BCD0CB; }
.sim-result dl { display: grid; gap: .75rem; margin: 1.75rem 0; }
.sim-result dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .75rem; border-top: 1px solid rgba(247, 244, 238, .22); }
.sim-result dt { color: #D3DFDB; }
.sim-result dd { margin: 0; font-weight: 700; text-align: right; }
.sim-note { margin: 0 0 1.5rem; font-size: .82rem; color: #BCD0CB; }

/* ---------- Pages légales ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose a { text-decoration: underline; }
.prose .meta { color: var(--muted); font-size: .9rem; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-dark); color: #CFDCD8; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-tagline { margin: 1.1rem 0 0; max-width: 32ch; }
.site-footer h2 {
  margin-bottom: 1rem; font-family: var(--font-body);
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: #D9B26B;
}
.site-footer a { color: #E8EFEC; }
.site-footer a:hover { color: var(--white); }
.site-footer ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.site-footer address { font-style: normal; line-height: 1.8; }
.footer-warning { padding: 1.1rem 0; border-top: 1px solid rgba(247, 244, 238, .14); font-size: .85rem; color: #E8EFEC; }
.footer-warning p { margin: 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  padding: 1rem 0 1.75rem; border-top: 1px solid rgba(247, 244, 238, .14);
  font-size: .82rem; color: #9FB5B0;
}
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-client { display: block; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; margin: 0;
    padding: .75rem 1.25rem 1.25rem; background: var(--ivory); border-bottom: 1px solid var(--line);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: .15rem; }
  .primary-nav a { padding: .8rem .75rem; }

  .hero-grid, .split, .sim, .contact-grid { grid-template-columns: 1fr; }
  .sim-result { position: static; }
  .hero-media { order: -1; }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .range-row { grid-template-columns: 1fr; }
  .info-list > div { grid-template-columns: 1fr; gap: .15rem; }
  .btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* =========================================================
   AUTHENTIFICATION
   ========================================================= */
.auth-body { background: var(--ivory); }
.auth {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-visual {
  position: sticky; top: 0; align-self: start;
  height: 100vh; height: 100dvh;
  background: var(--green);
}
.auth-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-visual__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2rem 2.25rem 2.25rem;
  background: rgba(10, 43, 44, .9); color: var(--ivory);
}
.auth-visual__caption p { margin: 1.1rem 0 0; max-width: 36ch; color: #D3DFDB; }

.auth-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.auth-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}
.auth-back { font-size: .92rem; font-weight: 600; color: var(--green); }
.auth-back:hover { color: var(--green-dark); }
.auth-logo { display: none; }

.auth-panel { width: min(100%, 480px); margin: auto; padding: 1rem clamp(1.25rem, 4vw, 2rem) 3rem; }
.auth-panel--wide { width: min(100%, 580px); }
.auth-panel h1 { margin-bottom: .35em; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.auth-panel .lead { margin-bottom: 2rem; font-size: 1.02rem; }

.auth-alt { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
.auth-alt a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-alt a + a { margin-left: 1.25rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.field-label-row label { margin: 0; }
.field-label-row a { font-size: .88rem; font-weight: 500; }
.btn-block { width: 100%; }
.links-inline { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-left: 1.7rem; }
.links-inline a { font-weight: 600; }

.pwd { position: relative; }
.pwd .input { padding-right: 5.5rem; }
.pwd-toggle {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  padding: .4rem .65rem; border: 0; border-radius: 4px; background: transparent;
  color: var(--green); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.pwd-toggle:hover { background: var(--sand); }

.auth-foot {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem); font-size: .85rem; color: var(--muted);
}
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--green); }

@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { position: relative; top: auto; height: 240px; }
  .auth-visual__caption { padding: 1.25rem 1.5rem; }
  .auth-visual__caption p { margin-top: .6rem; font-size: .92rem; }
  .auth-main { min-height: 0; }
  .auth-logo { display: none; }   /* le logo est déjà dans le bandeau */
}

@media (max-width: 560px) {
  .auth-visual { height: 200px; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

/* =========================================================
   ESPACE CLIENT : DEMANDES ET DOCUMENTS
   ========================================================= */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.client-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
.stack { display: grid; gap: 2rem; }
.panel { padding: clamp(1.25rem, 3vw, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin-bottom: .6em; font-size: 1.3rem; }
.panel .lead { font-size: 1rem; }

/* Pastilles de statut */
.badge {
  display: inline-block; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--sand); color: var(--ink); font-size: .8rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge--submitted, .badge--in_review { background: #E3ECE9; border-color: #B9CFC8; color: #0F3D3E; }
.badge--documents_required, .badge--pending { background: #FBF1DC; border-color: #E5CE9B; color: #6B4A0E; }
.badge--approved, .badge--validated { background: #E6F3EB; border-color: #9CCDB0; color: #14532D; }
.badge--rejected, .badge--cancelled { background: #FBEAE8; border-color: #E3A39E; color: #7A1A14; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .85rem .75rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table a { font-weight: 600; }
.table small { display: block; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.row-actions form { margin: 0; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--white); }
.empty { padding: 1.75rem; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); background: var(--ivory); }

/* Téléversement */
.upload-grid { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 1rem; align-items: end; margin-bottom: 2rem; }
.upload-grid .field { margin: 0; }
.input[type="file"] { padding: .6rem .7rem; }

/* Formulaire en étapes */
.stepper { display: flex; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; counter-reset: s; }
.stepper li {
  flex: 1; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--muted); font-size: .88rem; font-weight: 600;
}
.stepper li::before {
  counter-increment: s; content: counter(s);
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; margin-right: .55rem; border-radius: 50%;
  background: var(--sand); color: var(--ink); font-size: .8rem;
}
.stepper li[aria-current="step"] { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.stepper li[aria-current="step"]::before { background: var(--green); color: var(--ivory); }
.step-panel { min-width: 0; margin: 0; padding: 0; border: 0; }
.step-panel legend { margin-bottom: 1.25rem; padding: 0; font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--green); }
.step-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.5rem; }
.recap { margin: 0 0 1.5rem; padding: 1.25rem; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); }
.recap h3 { margin-bottom: 1rem; font-size: 1.05rem; }

@media (max-width: 760px) {
  .upload-grid { grid-template-columns: 1fr; }
  .stepper li:not([aria-current="step"]) span { display: none; }
  .stepper li:not([aria-current="step"]) { flex: 0 0 auto; }
  .stepper li:not([aria-current="step"])::before { margin-right: 0; }
  .step-actions .btn { flex: 1; }
}


/* =========================================================
   ESPACE CLIENT COMPLET
   ========================================================= */

/* Navigation de l'espace client */
.client-nav-wrap { background: var(--white); border-bottom: 1px solid var(--line); }
.client-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; }
.client-nav ul { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.client-nav li { flex: none; }
.client-nav ul a {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: var(--radius);
  font-size: .93rem; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.client-nav ul a:hover { background: var(--sand); }
.client-nav ul a[aria-current="page"] { background: var(--green-soft); color: var(--green); font-weight: 700; }
.client-nav form { flex: none; margin: 0; }
.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem;
  border-radius: 999px; background: var(--brass-text); color: var(--white); font-size: .75rem; font-weight: 700;
}

/* Compteurs */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { padding: 1.4rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stat__value { margin: 0; font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--green); }
.stat__label { margin: .5rem 0 0; font-size: .92rem; color: var(--muted); }

.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.alert-warning { background: #FBF1DC; border-color: #E5CE9B; color: #5E420C; }
.alert-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.alert-action p { margin: 0; }
.panel-foot { margin-top: 1.25rem; }

/* Filtres */
.filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin-bottom: 1.25rem; }
.filters .field { margin: 0; }
.filters-actions { display: flex; gap: .5rem; }
.result-count { margin: 0 0 .75rem; font-size: .9rem; color: var(--muted); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.pagination__info { font-size: .9rem; color: var(--muted); }
.is-disabled { opacity: .45; cursor: not-allowed; }

/* Chronologie du dossier */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 1.5rem 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: .15rem; top: .4rem; width: .85rem; height: .85rem;
  border-radius: 50%; background: #BFB8A6;
}
.timeline li::after {
  content: ""; position: absolute; left: .525rem; top: 1.35rem; bottom: -.1rem; width: 2px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline li.is-current::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline__title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-weight: 700; color: var(--green); }
.timeline__date { margin: .15rem 0 0; font-size: .85rem; color: var(--muted); }
.timeline__comment { margin: .5rem 0 0; padding: .7rem .9rem; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; }

/* Notifications */
.notif-list { margin: 0; padding: 0; list-style: none; }
.notif { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.is-unread { margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; background: var(--green-soft); border-radius: var(--radius); border-bottom-color: transparent; }
.notif__body { min-width: 0; }
.notif__title { margin: 0; font-weight: 600; }
.notif__title a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.notif__msg { margin: .25rem 0 0; color: var(--muted); font-size: .93rem; }
.notif__date { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); }
.notif form { margin: 0; flex: none; }

/* Assistance */
.badge--open { background: #FBF1DC; border-color: #E5CE9B; color: #6B4A0E; }
.badge--answered { background: #E6F3EB; border-color: #9CCDB0; color: #14532D; }
.badge--closed { background: var(--sand); border-color: var(--line); color: var(--muted); }
.thread { display: grid; gap: 1rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.msg { max-width: 85%; padding: 1rem 1.15rem; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); }
.msg--staff { justify-self: end; background: var(--green-soft); border-color: #B9CFC8; }
.msg__meta { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); }
.msg__meta strong { color: var(--green); }
.msg p:last-child { margin: 0; }

/* Profil */
.field-row-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 1rem; }
.pwd-toggle-wrap { max-width: 460px; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .filters-actions .btn { flex: 1; }
  .notif { flex-direction: column; }
  .msg { max-width: 100%; }
  .field-row-3 { grid-template-columns: 1fr; }
  .client-nav { flex-direction: column; align-items: stretch; }
  .client-nav form .btn { width: 100%; }
}


/* =========================================================
   ÉTAPE 7
   ========================================================= */
.badge--active, .badge--favorable { background: #E6F3EB; border-color: #9CCDB0; color: #14532D; }
.badge--suspended, .badge--defavorable { background: #FBEAE8; border-color: #E3A39E; color: #7A1A14; }
.badge--reserve, .badge--unread { background: #FBF1DC; border-color: #E5CE9B; color: #6B4A0E; }
.badge--disabled, .badge--read { background: var(--sand); border-color: var(--line); color: var(--muted); }

.admin-user .role { margin-bottom: .4rem; }
.admin-user .account-link { display: block; margin-bottom: .9rem; color: #E8EFEC; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.admin-user .account-link:hover { color: var(--white); }

/* Onglets */
.tabs { display: flex; gap: .4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; overflow-x: auto; }
.tabs a {
  display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  color: var(--ink); font-size: .93rem; font-weight: 500;
}
.tabs a:hover { background: var(--sand); }
.tabs a[aria-current="page"] { background: var(--green); border-color: var(--green); color: var(--ivory); font-weight: 700; }
.tabs a[aria-current="page"] .count { background: var(--ivory); color: var(--green); }

/* Évaluations */
.eval-list { display: grid; gap: 1rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.eval-list li { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.eval-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.eval-list p { margin: 0; }
.eval-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .35rem !important; font-size: .87rem; color: var(--muted); }

/* Formulaires et tableaux d'édition */
.grid-form { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 0 1rem; align-items: start; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.inline-form .select { width: auto; padding: .5rem .6rem; font-size: .9rem; }
.table--edit .input { min-width: 92px; padding: .5rem .6rem; font-size: .92rem; }
.table--edit td, .table--edit th { padding-left: .4rem; padding-right: .4rem; }
.error-list { margin: 0 0 1rem; padding-left: 1.2rem; }

/* Mot de passe temporaire */
.secret {
  display: block; margin: .6rem 0; padding: .9rem 1rem; background: var(--white);
  border: 1px solid var(--brass); border-radius: var(--radius);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 1.25rem; letter-spacing: .06em; user-select: all;
}

/* Journal */
.log-details { max-width: 340px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .grid-form { grid-template-columns: 1fr; }
}