/* ============================================================
   visitecarte — interface de gestion
   Direction : clair, professionnel, indigo → cyan
   ============================================================ */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f4fa;
  --surface-3: #e9eef7;
  --line: #e2e8f2;
  --line-strong: #ccd6e5;

  --text: #101728;
  --text-soft: #4c5670;
  --text-mute: #8b95ac;

  --indigo: #4f46e5;
  --indigo-soft: #eef0fe;
  --cyan: #0891b2;
  --coral: #e11d48;
  --coral-soft: #fef2f4;
  --mint: #059669;
  --amber: #b45309;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);

  --r-sm: 10px;
  --r-md: 13px;
  --r-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(16, 23, 40, 0.06);
  --shadow-sm: 0 2px 6px rgba(16, 23, 40, 0.06), 0 1px 2px rgba(16, 23, 40, 0.04);
  --shadow-md: 0 14px 30px -14px rgba(16, 23, 40, 0.24), 0 2px 6px rgba(16, 23, 40, 0.05);
  --shadow-lg: 0 30px 60px -28px rgba(16, 23, 40, 0.34);
  --glow: 0 10px 24px -10px rgba(79, 70, 229, 0.55);

  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(
      680px circle at 8% -6%,
      rgba(79, 70, 229, 0.09),
      transparent 62%
    ),
    radial-gradient(620px circle at 96% 2%, rgba(8, 145, 178, 0.08), transparent 58%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Structure ---------- */

.wrap {
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(160%);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gradient);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.site-nav a,
.site-nav button.link {
  color: var(--text-soft);
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.site-nav a:hover,
.site-nav button.link:hover {
  color: var(--indigo);
  background: var(--indigo-soft);
  border-color: #dcdffb;
  text-decoration: none;
}

.site-nav form {
  margin: 0;
}

main {
  padding: 3rem 0 6rem;
}

/* ---------- Titres ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 0.85rem;
  padding: 0.32rem 0.8rem;
  border: 1px solid #dcdffb;
  border-radius: 999px;
  background: var(--indigo-soft);
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 0.7rem;
}

h1 em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

.lede {
  color: var(--text-soft);
  max-width: 60ch;
  margin: 0 0 2.5rem;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.page-head .lede {
  margin-bottom: 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.25rem 0;
}

.big-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gradient);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 30px -12px rgba(79, 70, 229, 0.6);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--indigo);
  color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-soft);
}

.btn-danger {
  background: var(--surface);
  color: var(--coral);
  border-color: #f5c6d1;
  box-shadow: var(--shadow-xs);
}

.btn-danger:hover {
  background: var(--coral);
  color: #ffffff;
  border-color: var(--coral);
  box-shadow: 0 12px 24px -12px rgba(225, 29, 72, 0.6);
}

.btn-sm {
  padding: 0.48rem 1rem;
  font-size: 0.78rem;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--indigo);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--cyan);
}

/* ---------- Messages ---------- */

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.65rem;
}

.messages li {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1.15rem 0.9rem 1.4rem;
  font-size: 0.94rem;
  animation: slide-down 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.messages li::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--mint);
}

.messages li.error::before {
  background: var(--coral);
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Grille des cartes ---------- */

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

.card-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.card-item::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.card-item:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card-item:hover::after {
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.card-item__top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 17px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}

.avatar--empty {
  display: grid;
  place-items: center;
  background: var(--gradient);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  border: 0;
}

.card-item h2 {
  margin: 0;
  font-size: 1.2rem;
}

.card-item__role {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 0.15rem 0 0;
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  word-break: break-all;
  margin: 0 0 1.15rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  background: #e7f7f0;
  color: var(--mint);
  border: 1px solid #bfe8d8;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--off {
  background: var(--surface-2);
  color: var(--text-mute);
  border-color: var(--line);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-actions form {
  margin: 0;
}

/* ---------- État vide ---------- */

.empty {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 4rem 2rem;
  text-align: center;
  background: var(--surface);
}

.empty .eyebrow {
  margin-inline: auto;
}

.empty p {
  color: var(--text-soft);
  max-width: 44ch;
  margin: 0 auto 1.75rem;
}

/* ---------- Formulaires ---------- */

.form-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1040px) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.9rem;
  margin: 0 0 1.4rem;
  scroll-margin-top: 100px;
}

legend {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #ffffff;
}

.field-grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: 0;
  border-radius: var(--r-md);
  scroll-margin-top: 110px;
}

.form-group label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* champ mis en évidence après un clic sur « modifier » */
.form-group.is-target,
fieldset.is-target {
  animation: flash 3s ease;
}

@keyframes flash {
  0%,
  70% {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 0.75rem 0.95rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-mute);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
  cursor: pointer;
}

input[type="color"] {
  width: 100%;
  height: 48px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--indigo);
  height: 30px;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.checkbox-row label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--indigo);
  cursor: pointer;
  flex: none;
}

.helper-text {
  font-size: 0.79rem;
  color: var(--text-mute);
  line-height: 1.5;
}

.helper-text ul,
ul.helper-text {
  margin: 0.3rem 0 0;
}

.error-text {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--coral);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: slide-down 0.22s ease;
}

.error-text::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  flex: none;
}

/* ---------- Mot de passe : œil ---------- */

.password-box {
  position: relative;
  display: flex;
  align-items: center;
}

.password-box input {
  padding-right: 3.1rem;
}

.password-eye {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.password-eye:hover {
  color: var(--indigo);
  background: var(--indigo-soft);
}

.password-eye svg {
  width: 19px;
  height: 19px;
}

/* ---------- Champ image ---------- */

.image-field__box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.image-field__thumb {
  flex: none;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background-color: var(--surface-2);
  background-image: linear-gradient(45deg, #e3e9f3 25%, transparent 25%),
    linear-gradient(-45deg, #e3e9f3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e3e9f3 75%),
    linear-gradient(-45deg, transparent 75%, #e3e9f3 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  box-shadow: var(--shadow-xs);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.image-field__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-field__empty {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-align: center;
}

.image-field__actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

/* le vrai champ fichier est masqué, remplacé par un bouton lisible */
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--indigo);
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.file-btn:hover {
  background: var(--gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
}

.file-btn svg {
  width: 17px;
  height: 17px;
}

.file-input:focus-visible + .file-btn {
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.file-name {
  font-size: 0.78rem;
  color: var(--text-mute);
  word-break: break-all;
}

.image-field__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid #f5c6d1;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.image-field__clear:hover {
  background: var(--coral);
  color: #ffffff;
}

.image-field__clear input {
  width: 15px;
  height: 15px;
  accent-color: var(--coral);
  margin: 0;
}

.image-field.is-cleared .image-field__thumb {
  opacity: 0.35;
  border-color: var(--coral);
}

.image-field.is-cleared .image-field__clear {
  background: var(--coral);
  color: #ffffff;
}

/* ---------- Produits ---------- */

.product-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.product-row:first-of-type {
  border-top: 0;
  padding-top: 0.4rem;
}

.form-footer {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Téléphone (aperçu) ---------- */

.preview-panel {
  position: sticky;
  top: 92px;
}

.preview-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 0.9rem;
}

.preview-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

.preview-phone,
.phone {
  position: relative;
  border: 1px solid #d2dae8;
  border-radius: 34px;
  padding: 11px;
  background: linear-gradient(160deg, #ffffff, #e8edf6);
  box-shadow: var(--shadow-lg);
}

.preview-phone::before,
.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 2;
}

.preview-screen {
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
  padding: 2.4rem 1.5rem 2rem;
  text-align: center;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-size: cover;
  background-position: center;
}

.preview-screen .pv-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid currentColor;
  margin-bottom: 0.5rem;
}

.preview-screen .pv-name {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.14;
}

.preview-screen .pv-role {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.preview-screen .pv-slogan {
  font-style: italic;
  opacity: 0.85;
  font-size: 0.92rem;
}

.preview-screen .pv-btn {
  margin-top: 1.1rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phone__screen {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  height: 620px;
}

.phone__screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Page QR code ---------- */

.qr-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 940px) {
  .qr-layout {
    grid-template-columns: 340px minmax(0, 1fr);
  }
}

.qr-sheet {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #ffffff;
  color: #101728;
  padding: 2.25rem 1.75rem 1.9rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.qr-sheet img {
  width: min(260px, 100%);
  height: auto;
  display: block;
  margin: 0 auto 1.2rem;
}

.qr-sheet .qr-scan {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--gradient);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin: 0 0 1.3rem;
}

.qr-sheet .qr-name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.qr-sheet .qr-role {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 0.25rem;
}

/* ---------- Panneaux et récapitulatif ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  margin-bottom: 1.4rem;
}

.panel > h2 {
  margin-bottom: 1rem;
}

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

.recap__row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.recap__row:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}

.recap__icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.recap__body {
  min-width: 0;
  flex: 1;
}

.recap__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 700;
}

.recap__value {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

.recap__value--empty {
  color: var(--text-mute);
  font-style: italic;
}

/* petit bouton crayon pour modifier l'information */
.recap__edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-mute);
  box-shadow: var(--shadow-xs);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease,
    transform 0.18s ease;
}

.recap__edit:hover {
  color: #ffffff;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-2px);
  text-decoration: none;
}

.recap__edit svg {
  width: 15px;
  height: 15px;
}

.swatch {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  vertical-align: -3px;
  margin: 0 1px;
}

.recap--products {
  grid-template-columns: minmax(0, 1fr);
}

.copy-box {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.copy-box input {
  flex: 1 1 260px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.steps li {
  counter-increment: step;
  padding-left: 3rem;
  position: relative;
  color: var(--text-soft);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--gradient);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

/* ---------- Connexion / inscription ---------- */

.auth-card {
  max-width: 460px;
  margin: 2rem auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 2.75rem;
}

.auth-card--wide {
  max-width: 720px;
}

.auth-card h1 {
  font-size: 2.1rem;
}

.auth-card .lede {
  margin-bottom: 1.75rem;
}

.auth-card ul {
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-mute);
  margin: 0.3rem 0 0;
}

/* ---------- Popup ---------- */

dialog.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(460px, calc(100% - 2rem));
  width: 100%;
}

dialog.modal::backdrop {
  background: rgba(16, 23, 40, 0.55);
  backdrop-filter: blur(4px);
}

.modal__box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem;
  animation: pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.modal__close:hover {
  background: var(--coral);
  color: #ffffff;
  border-color: var(--coral);
}

/* ---------- Impression ---------- */

@media print {
  body {
    background: #fff !important;
  }

  .site-header,
  .no-print,
  .messages {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .qr-layout {
    display: block;
  }

  .qr-sheet {
    box-shadow: none;
    border: 0;
    page-break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
