/* Styles des pages « Je serai là » et backoffice (indépendants du site principal). */
:root {
  --ink: #0e224c;
  --night: #091934;
  --paper: #f8f7f3;
  --orange: #ee642e;
  --yellow: #f8c70f;
  --line: rgba(14, 34, 76, .12);
  --muted: #5b6886;
  --danger: #c0392b;
  --ok: #1e8e5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
[v-cloak] { display: none; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 1.6rem; border: 0; border-radius: 6px;
  font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--orange); color: #fff; transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .75; }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: .72rem; }

.field {
  width: 100%; min-height: 56px; padding: 0 1rem; margin-top: .55rem;
  border: 1.5px solid var(--line); border-radius: 6px; background: #fff;
  font: inherit; font-size: 1.1rem; color: var(--ink);
}
.field:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(238, 100, 46, .15); }
.label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.error { color: var(--danger); font-size: .85rem; margin-top: .7rem; min-height: 1.2em; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.file-warning {margin: 0; padding: 12px 20px; background: #fff4c7; color: #5a4300; font-size: .88rem; line-height: 1.5; text-align: center; }
.file-warning a { font-weight: 700; word-break: break-all; }

/* ---------- Formulaire par étapes ---------- */
.step-page {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--night); color: #fff;
}
.step-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; }
.step-top img { height: 44px; width: auto; }
.step-top a { font-size: .8rem; color: rgba(255,255,255,.6); text-decoration: none; }
.progress { height: 4px; background: rgba(255,255,255,.12); }
.progress span { display: block; height: 100%; background: var(--orange); transition: width .35s ease; }
.step-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 20px 48px; }
.step-card { width: min(520px, 100%); }
.step-count { font-size: .75rem; font-weight: 700; letter-spacing: .18em; color: var(--yellow); }
.step-q { font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 700; line-height: 1.08; letter-spacing: -.04em; margin: .6rem 0 2rem; }
.step-card .label { color: rgba(255,255,255,.6); }
.step-card .field { border-color: transparent; }
.step-card .error { color: #ffb4a2; }
.step-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.step-actions .btn:last-child { flex: 1; }
.slide-enter-active, .slide-leave-active { transition: opacity .25s, transform .25s; }
.slide-enter-from { opacity: 0; transform: translateX(24px); }
.slide-leave-to { opacity: 0; transform: translateX(-24px); }
.done-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; font-size: 2rem; margin-bottom: 1.5rem; }
.step-foot { text-align: center; font-size: .75rem; color: rgba(255,255,255,.45); padding: 0 20px 24px; }

/* ---------- Backoffice ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--night); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 12px; padding: 36px 32px; }
.login-card img { height: 48px; margin-bottom: 1.25rem; }
.login-card h1 { font-size: 1.6rem; margin: 0 0 .3rem; letter-spacing: -.03em; }
.login-card p { color: var(--muted); font-size: .9rem; margin: 0 0 1.5rem; }
.login-card label { display: block; margin-bottom: 1rem; }
.login-card .btn { width: 100%; margin-top: .5rem; }

.bo { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.bo-side { background: var(--night); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.bo-side img { height: 42px; width: auto; align-self: flex-start; margin: 0 8px 28px; }
.bo-nav { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: rgba(255,255,255,.7); padding: 11px 12px; border-radius: 6px; font-size: .9rem; }
.bo-nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.bo-nav.active { background: rgba(238,100,46,.18); color: #fff; }
.bo-nav small { background: rgba(255,255,255,.12); border-radius: 99px; padding: 2px 8px; font-size: .72rem; }
.bo-side .spacer { flex: 1; }
.bo-user { font-size: .75rem; color: rgba(255,255,255,.5); padding: 0 12px 10px; word-break: break-all; }
.bo-main { padding: 32px clamp(16px, 3vw, 40px); min-width: 0; }
.bo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.bo-head h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.03em; }
.bo-head p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.bo-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bo-tools .field { min-height: 40px; margin: 0; font-size: .9rem; width: 240px; }
.bo-tools select.field { width: auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.stat b { display: block; font-size: 2rem; letter-spacing: -.03em; }
.stat span { font-size: .78rem; color: var(--muted); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: #fafaf8; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.msg { max-width: 360px; white-space: pre-wrap; color: #334; }
td.nowrap { white-space: nowrap; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(14,34,76,.08); }
.tag.Pitch { background: #fde8df; color: #a8431b; }
.tag.Stand { background: #fff4c7; color: #7a5c00; }
.tag.Participation { background: #dff3e9; color: #17663f; }
.tag.Partenariat { background: #e4e9f7; color: #22408b; }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.del { background: none; border: 0; color: var(--danger); font-size: .78rem; padding: 4px; }

.share { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 24px; align-items: center; margin-bottom: 24px; }
.share .qr { background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 8px; line-height: 0; }
.share .qr img { width: 180px; height: 180px; image-rendering: pixelated; }
.share h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.share p { margin: 0 0 1rem; color: var(--muted); font-size: .88rem; }
.share code { display: block; padding: 10px 12px; background: var(--paper); border-radius: 6px; font-size: .85rem; word-break: break-all; margin-bottom: 12px; }
.backup-icon { width: 72px; height: 72px; border-radius: 12px; background: rgba(14,34,76,.07); display: grid; place-items: center; font-size: 2rem; color: var(--ink); }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: .85rem; }

.tag.r-Reussie { background: #dff3e9; color: #17663f; }
.tag.r-Echouee { background: #fde8df; color: #a8431b; }
.tag.r-Bloquee { background: #c0392b; color: #fff; }
.tag.r-Expiree, .tag.r-Deconnexion { background: #eef0f4; color: #5b6886; }
td.ua { max-width: 280px; font-size: .75rem; color: var(--muted); word-break: break-word; }
.notice { background: #e4e9f7; color: #22408b; border-radius: 6px; padding: 10px 12px; font-size: .85rem; margin-bottom: 1rem; }

/* Fenêtre de confirmation */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(9, 25, 52, .55); backdrop-filter: blur(3px); animation: fade .15s ease; }
.modal { width: min(420px, 100%); background: #fff; border-radius: 12px; padding: 26px 24px 20px; box-shadow: 0 24px 60px rgba(9, 25, 52, .3); animation: pop .18s ease; }
.modal h2 { margin: 0 0 .5rem; font-size: 1.25rem; letter-spacing: -.02em; }
.modal p { margin: 0 0 1.4rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-danger { background: var(--danger); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }

@media (max-width: 820px) {
  .bo { grid-template-columns: 1fr; }
  .bo-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .bo-side img { margin: 0 8px 0 0; height: 34px; }
  .bo-side .spacer, .bo-user { display: none; }
  .bo-nav { width: auto; }
  .bo-tools .field { width: 100%; }
  .share { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-enter-active, .slide-leave-active, .progress span, .btn { transition: none; }
}
@media print {
  .bo-side, .bo-tools, .del, .no-print { display: none !important; }
  .bo { display: block; }
}
