/* ═══ LOT H — Carte de visite 3D métallique (vCard) ═══
   Acier brossé sombre + foil conique + reflet spéculaire suivant le pointeur.
   Tilt piloté par le controller vcard-tilt (--rx/--ry rotation, --mx/--my reflet).
   Or = accent RARE de la charte. Tout en tokens / couleurs métalliques dédiées. */

/* Custom property animable (foil) — nécessite @property pour interpoler l'angle. */
@property --vc-foil {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.vcard-page { padding: var(--space-6) var(--space-5) var(--space-8); }
.vcard-page__eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--gold); margin: 0; }
.vcard-page__title { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: var(--text-3xl); color: var(--text-primary); margin: 2px 0 0; }

/* Scène : perspective + centrage. */
.vcard-stage {
  perspective: 1300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: clamp(24px, 5vw, 64px) 0;
}

/* La carte : base acier brossé + tilt 3D. */
.vcard {
  --steel-hi: #3c4250;
  --steel-mid: #23262e;
  --steel-lo: #141519;
  position: relative;
  width: min(360px, 84vw);
  aspect-ratio: 0.63;
  border-radius: 22px;
  transform-style: preserve-3d;
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.18s var(--ease-silk);
  background:
    linear-gradient(135deg, var(--steel-hi) 0%, var(--steel-mid) 26%, var(--steel-lo) 52%, var(--steel-mid) 74%, var(--steel-lo) 100%);
  box-shadow:
    0 34px 70px -24px rgba(0, 0, 0, 0.78),
    0 8px 22px -12px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

/* Texture acier brossé (fines stries verticales). */
.vcard__brushed {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* Foil métallique conique, tourne lentement (bleu acier + soupçon d'or). */
.vcard__foil {
  position: absolute; inset: -35%; border-radius: inherit; pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--vc-foil),
    transparent 0deg,
    rgba(140, 165, 210, 0.28) 40deg,
    transparent 90deg,
    rgba(212, 175, 55, 0.2) 150deg,
    transparent 200deg,
    rgba(140, 165, 210, 0.28) 280deg,
    transparent 330deg);
  mix-blend-mode: overlay;
  opacity: 0.7;
  animation: vc-foil-spin 9s linear infinite;
}
@keyframes vc-foil-spin { to { --vc-foil: 360deg; } }

/* Reflet spéculaire qui suit le pointeur (posé via --mx/--my par le controller). */
.vcard__sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%),
    rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 22%, transparent 48%);
  mix-blend-mode: soft-light;
  transition: background 0.1s linear;
}

/* Liseré or intérieur (accent rare). */
.vcard__edge {
  position: absolute; inset: 10px; border-radius: 16px; pointer-events: none; z-index: 2;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
  box-shadow: inset 0 0 22px -14px color-mix(in srgb, var(--gold) 60%, transparent);
}

/* Contenu (couches translateZ via style inline → profondeur/parallaxe). */
.vcard__content {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(20px, 6%, 30px);
  transform-style: preserve-3d;
  text-align: center;
}
.vcard__top { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vcard__logo { display: inline-flex; height: 40px; }
.vcard__logo img { max-height: 40px; width: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.18)); }
.vcard__logo svg { height: 40px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.vcard__tier { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: color-mix(in srgb, var(--gold) 80%, #fff); }

.vcard__chef { margin: clamp(14px, 4%, 22px) 0; }
.vcard__chef-img, .vcard__chef-ph {
  width: clamp(96px, 30%, 130px); aspect-ratio: 1; border-radius: 50%;
  object-fit: cover; display: grid; place-items: center;
  border: 2px solid color-mix(in srgb, var(--gold) 45%, transparent);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.vcard__chef-ph { background: linear-gradient(140deg, #2c313c, #14151a); color: rgba(255, 255, 255, 0.5); }
.vcard__chef-ph svg { width: 52%; height: 52%; }

.vcard__info-col { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.vcard__id { text-align: center; }
.vcard__name { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: var(--text-2xl); line-height: 1.15; color: #fff; margin: 0; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.vcard__manager { font-size: var(--text-sm); color: rgba(255, 255, 255, 0.72); margin: 6px 0 0; }
.vcard__manager-label { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: color-mix(in srgb, var(--gold) 75%, #fff); margin-right: 6px; }

.vcard__contacts { list-style: none; margin: clamp(14px, 4%, 20px) 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.vcard__contact { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: rgba(255, 255, 255, 0.8); }
.vcard__contact .icon { width: 13px; height: 13px; color: color-mix(in srgb, var(--gold) 70%, #fff); flex: none; }
.vcard__contact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vcard-hint { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-tertiary); text-align: center; margin: 0; }
.vcard-hint .icon { width: 13px; height: 13px; color: var(--gold); }
.vcard-edit { align-self: center; }

/* QR code du contact — chip clair FIXE (le QR doit rester scannable dans les 2 thèmes ;
   le padding blanc fait office de quiet zone). */
.vcard-qr { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.vcard-qr__code {
  width: 148px; height: 148px; padding: 12px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--gold-stroke), var(--shadow-md);
}
.vcard-qr__code svg { display: block; width: 100%; height: 100%; }
.vcard-qr__caption { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-tertiary); margin: 0; }
.vcard-qr__caption .icon { width: 13px; height: 13px; color: var(--gold); }

/* Mobile : la carte adopte un format PAYSAGE + contenu en 2 colonnes (chef | infos). */
@media (max-width: 640px) {
  .vcard { width: min(94vw, 520px); aspect-ratio: 1.68; }
  .vcard__content { flex-direction: row; align-items: center; text-align: left; gap: clamp(12px, 4%, 22px); }
  .vcard__top { position: absolute; top: clamp(14px, 5%, 18px); left: clamp(16px, 5%, 22px); right: clamp(16px, 5%, 22px); flex-direction: row; justify-content: space-between; align-items: center; }
  .vcard__chef { margin: 0; flex: none; }
  .vcard__id { margin: 0 0 6px; text-align: left; }
  .vcard__name { font-size: var(--text-xl); }
  .vcard__contacts { align-items: flex-start; }
  .vcard__contact { justify-content: flex-start; }
  .vcard__info-col { align-items: flex-start; min-width: 0; margin-top: 22px; }
}

/* Accessibilité mouvement : pas de foil animé, pas de transition de tilt agressive. */
@media (prefers-reduced-motion: reduce) {
  .vcard__foil { animation: none; }
  .vcard { transition: none; }
}

/* Thème clair : la carte reste volontairement sombre/métallique (objet « premium »),
   on adoucit juste l'ombre portée pour le fond ivoire. */
[data-theme="light"] .vcard {
  box-shadow: 0 30px 60px -26px rgba(20, 18, 39, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
