/* =========================================================
   RCP EVOLUTION — Espace client (accès par code)
   Repris de l'ancien site, aux couleurs du nouveau design
   ========================================================= */

/* Bouton « Mon espace » dans l'en-tête */
.nav__espace {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text);
  font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  transition: border-color .25s, color .25s;
}
.nav__espace:hover { border-color: var(--gold); color: var(--gold); }
.nav__espace svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.mm-espace { margin-top: 10px; }

/* Fenêtre */
#ec-overlay {
  position: fixed; inset: 0; z-index: 9100; display: none; align-items: flex-start; justify-content: center;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: rgba(5,4,3,.92);
}
#ec-overlay.open { display: flex; }
.ec-panel {
  width: min(880px, 100%); min-height: 100%; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font-family: var(--f-body);
  border-inline: 1px solid var(--line);
}
.ec-top {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: #0d0b09; border-bottom: 1px solid var(--line);
}
.ec-top .ec-logo {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: var(--on-gold); font-family: var(--f-display); font-weight: 800; font-size: 13px; letter-spacing: .04em;
}
.ec-top h3 { flex: 1; margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
.ec-top .ec-x {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); font-size: 16px; display: grid; place-items: center;
}
.ec-out {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(242,185,67,.45);
  background: rgba(242,185,67,.1); color: var(--gold); font-weight: 600; font-size: 13px; white-space: nowrap;
}

/* Connexion */
#ec-login { max-width: 440px; margin: 0 auto; padding: 48px 22px 64px; text-align: center; }
#ec-login .ec-emb {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center;
  background: rgba(242,185,67,.1); border: 1px solid rgba(242,185,67,.3); color: var(--gold);
}
#ec-login .ec-emb svg { width: 34px; height: 34px; }
#ec-login h4 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 800; font-size: 32px; line-height: 1; text-transform: uppercase; }
#ec-login p { margin: 0 0 24px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
#ec-login input[type=text] {
  width: 100%; min-height: 56px; margin-bottom: 14px; padding: 14px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  text-align: center; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .2em; text-transform: uppercase;
}
#ec-login input[type=text]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242,185,67,.15); }
#ec-login label.rem { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
#ec-login label.rem input { width: 18px; height: 18px; accent-color: var(--gold); }
.ec-btn {
  width: 100%; min-height: 56px; border: 0; border-radius: 999px; background: var(--grad); color: var(--on-gold);
  font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 10px 40px -10px rgba(242,185,67,.55);
}
.ec-btn:disabled { opacity: .6; }
#ec-err { min-height: 20px; margin-top: 12px; font-size: 14px; color: #ff8a73; }

/* Espace connecté */
#ec-space { display: none; flex: 1; flex-direction: column; }
.ec-hello { padding: 20px 18px 4px; font-size: 17px; color: var(--text); }
.ec-hello b { color: var(--gold); }
.ec-msg { margin: 8px 18px 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.ec-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 0; }
.ec-meta span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--muted); }
.ec-meta b { color: var(--text); font-weight: 600; }
#ec-renew {
  align-self: flex-start; min-height: 44px; margin: 12px 18px 0; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(242,185,67,.5); background: rgba(242,185,67,.1); color: var(--gold);
  font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
}
#ec-renew:hover { background: var(--grad); color: var(--on-gold); }
.ec-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 0; }
.ec-tab {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .05em; text-transform: uppercase;
}
.ec-tab.on { background: var(--grad); color: var(--on-gold); border-color: transparent; }
.ec-body { flex: 1; padding: 16px 16px 24px; }
.ec-frame { width: 100%; height: 70vh; min-height: 460px; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; }
.ec-doclist { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.ec-docchip {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-align: left; font-size: 15px; font-weight: 500;
}
.ec-docchip.on { background: var(--grad); color: var(--on-gold); border-color: transparent; font-weight: 700; }
.ec-docchip-ico { display: grid; place-items: center; flex: none; }
.ec-docchip-ico svg, .ec-fico svg { width: 20px; height: 20px; }
.ec-docchip-txt { flex: 1; }
.ec-open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--gold); font-weight: 600; font-size: 14px; }
.ec-ph { padding: 48px 20px; text-align: center; font-size: 15px; line-height: 1.6; color: var(--muted); }
.ec-files { list-style: none; margin: 0; padding: 0; }
.ec-files li { margin-bottom: 10px; }
.ec-files a {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 15px;
}
.ec-files a:hover { border-color: var(--gold); }
.ec-fico { color: var(--gold); display: grid; place-items: center; flex: none; }
.ec-logout { width: 100%; min-height: 48px; padding: 14px; border: 0; background: none; color: var(--muted); font-size: 14px; }

/* Fiche de renseignement */
.fq-wrap { max-width: 660px; margin: 0 auto; }
.fq-prog { position: sticky; top: 72px; z-index: 1; padding: 10px 0 12px; background: var(--bg); }
.fq-bar { height: 5px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.fq-bar i { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--grad); transition: width .35s var(--ease-out); }
.fq-step { margin-top: 8px; text-align: center; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fq-sec h4 { margin: 14px 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 26px; text-transform: uppercase; }
.fq-sec .fq-note { margin: 10px 0 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(242,185,67,.3); background: rgba(242,185,67,.08); font-size: 14px; line-height: 1.55; color: var(--gold); }
.fq-f { margin: 18px 0; }
.fq-f > label.q { display: block; margin-bottom: 8px; font-size: 15px; line-height: 1.45; color: var(--text); }
.fq-f .req { color: var(--gold); }
.fq-f .hint { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.fq-f input[type=text], .fq-f input[type=email], .fq-f input[type=tel], .fq-f input[type=number], .fq-f input[type=date], .fq-f textarea, .fq-f select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-size: 16px;
}
.fq-f textarea { min-height: 90px; resize: vertical; }
.fq-f input:focus, .fq-f textarea:focus, .fq-f select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242,185,67,.15); }
.fq-opts { display: flex; flex-direction: column; gap: 8px; }
.fq-opts label {
  display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 15px; line-height: 1.4; color: var(--text-2); cursor: pointer;
}
.fq-opts label:has(input:checked) { border-color: var(--gold); background: rgba(242,185,67,.1); color: var(--text); }
.fq-opts input { flex: none; margin-top: 2px; accent-color: var(--gold); }
.fq-scale { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.fq-scale label { flex: 1; min-width: 44px; justify-content: center; padding: 12px 0; font-weight: 700; }
.fq-scale input { display: none; }
.fq-scale label:has(input:checked) { background: var(--grad); color: var(--on-gold); border-color: transparent; }
.fq-mus { margin-bottom: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.fq-mus b { display: block; margin-bottom: 8px; font-size: 14px; color: var(--gold); }
.fq-nav { display: flex; gap: 10px; margin: 24px 0 6px; }
.fq-nav button {
  flex: 1; min-height: 54px; border-radius: 999px; border: 0;
  font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase;
}
.fq-prev { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong) !important; }
.fq-next { background: var(--grad); color: var(--on-gold); }
.fq-next:disabled { opacity: .5; }
.fq-err { min-height: 20px; margin-top: 8px; text-align: center; font-size: 14px; color: #ff8a73; }
.fq-done { padding: 56px 16px; text-align: center; }
.fq-done .big { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(123,216,143,.12); color: var(--ok); }
.fq-done .big svg { width: 38px; height: 38px; }
.fq-done h4 { margin: 16px 0 8px; font-family: var(--f-display); font-weight: 800; font-size: 30px; text-transform: uppercase; color: var(--gold); }
.fq-done p { max-width: 44ch; margin: 0 auto; font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Téléphone */
@media (max-width: 760px) {
  .ec-panel { border-inline: 0; }
  .ec-top { padding: 10px 14px; }
  .ec-top h3 { font-size: 19px; }
  .ec-frame { height: 64vh; min-height: 380px; }
  .ec-tab { flex: 1 1 auto; justify-content: center; font-size: 14px; }
  .nav__espace { width: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; color: var(--gold); }
  .nav__espace span { display: none; }
}
/* En-tête : les liens restent toujours sur une seule ligne, les boutons ne se compriment jamais */
.nav__links a { white-space: nowrap; }
.nav__cta > * { flex-shrink: 0; }
@media (max-width: 1480px) and (min-width: 761px) {
  .nav__links a { padding: 10px 10px; }
  .nav__inner { gap: 16px; }
}
@media (max-width: 1360px) and (min-width: 761px) {
  .nav__espace span { display: none; }
  .nav__espace { width: 46px; padding: 0; justify-content: center; border-radius: 50%; }
}
