/* ====================================================
   Ka Card — feuille de style principale
   Palette : terracotta #d25640, beige #f3efe8,
             vert #596c5c, noir #1a1a1a
   ==================================================== */

:root {
  --terracotta: #d25640;
  --beige:      #f3efe8;
  --vert:       #596c5c;
  --noir:       #1a1a1a;
  --radius-card: 20px;
  --radius-btn:  50px;
  --shadow:      0 8px 40px rgba(26, 26, 26, .12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background-color: var(--beige);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(210, 86, 64, .12) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--noir);
  padding: calc(2rem + env(safe-area-inset-top)) 1rem calc(2rem + env(safe-area-inset-bottom));
}

/* ---- Carte principale ---- */

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

/* ---- Photo ---- */

.card__photo-wrap {
  margin-bottom: .75rem;
}

.card__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--beige);
  box-shadow: 0 0 0 3px var(--terracotta);
  display: block;
}

.card__photo--placeholder {
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__photo--placeholder svg {
  width: 60px;
  height: 60px;
}

/* ---- Identité ---- */

.card__identity {
  text-align: center;
  margin-bottom: .25rem;
}

.card__name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--noir);
  line-height: 1.2;
}

.card__title {
  margin-top: .35rem;
  font-size: .95rem;
  color: var(--vert);
  font-weight: 400;
  letter-spacing: .01em;
}

/* ---- Badge agence ---- */

.card__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: .5rem;
}

.card__brand-logo {
  height: 100px;
  width: auto;
  display: block;
}

.card__brand-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .6rem;
}

.card__brand-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--beige);
  color: var(--terracotta);
  transition: background .15s ease, color .15s ease;
  text-decoration: none;
}

.card__brand-social a:hover {
  background: var(--terracotta);
  color: #fff;
}

.card__brand-social svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: currentColor;
}

.card__brand-social a:first-child svg {
  fill: none;
}

.card__brand--client .card__brand-logo--client {
  height: 60px;
}

.card__powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: .9rem 0 0;
  font-size: .72rem;
  color: var(--vert);
  opacity: .6;
}

.card__powered-by-logo {
  height: 16px;
  width: auto;
  display: block;
}

/* ---- Liens de contact ---- */

.card__links {
  list-style: none;
  width: 100%;
  margin-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.card__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  border-radius: 12px;
  background: var(--beige);
  color: var(--noir);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}

.card__link:hover,
.card__link:focus-visible {
  background: var(--terracotta);
  color: #fff;
  outline: none;
}

.card__link:hover .card__icon,
.card__link:focus-visible .card__icon {
  stroke: #fff;
  color: #fff;
}

.card__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--vert);
  color: var(--vert);
  transition: stroke .15s ease, color .15s ease;
}

/* LinkedIn — icône fill, pas stroke */
.card__link--linkedin .card__icon {
  fill: var(--vert);
  stroke: none;
}

.card__link--linkedin:hover .card__icon,
.card__link--linkedin:focus-visible .card__icon {
  fill: #fff;
  stroke: none;
}

/* ---- Bouton CTA ---- */

.card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-top: 1.25rem;
  width: 100%;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-btn);
  background: var(--terracotta);
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}

.card__cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: #fff;
}

.card__cta:hover {
  background: #b8432f;
}

.card__cta:active {
  transform: scale(.98);
}

.card__cta:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

/* ---- 404 ---- */

.card--404 {
  text-align: center;
}

/* ---- Bouton partage natif (flottant haut gauche) ---- */

.card__native-share-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(26,26,26,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: background .15s ease, transform .1s ease;
}

.card__native-share-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--terracotta);
}

.card__native-share-btn:hover {
  background: var(--terracotta);
}

.card__native-share-btn:hover svg {
  stroke: #fff;
}

.card__native-share-btn:active {
  transform: scale(.94);
}

/* ---- Bouton partage QR (flottant haut droite) ---- */

.card__share-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(26,26,26,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: background .15s ease, transform .1s ease;
}

.card__share-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--terracotta);
}

.card__share-btn:hover {
  background: var(--terracotta);
}

.card__share-btn:hover svg {
  stroke: #fff;
}

.card__share-btn:active {
  transform: scale(.94);
}

/* ---- Modal QR ---- */

.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.qr-modal.is-open {
  display: flex;
}

.qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,.5);
  backdrop-filter: blur(4px);
}

.qr-modal__box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.75rem 1.5rem;
  width: min(320px, calc(100vw - 2rem));
  text-align: center;
  box-shadow: 0 16px 48px rgba(26,26,26,.2);
  animation: qr-pop .2s ease;
}

@keyframes qr-pop {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.qr-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.qr-modal__label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}

.qr-modal__img {
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 1rem;
}

.qr-modal__url {
  font-size: .82rem;
  color: var(--vert);
  opacity: .7;
}

/* ---- Responsive ---- */

@media (max-width: 420px) {
  .card {
    border-radius: 14px;
    padding: 2rem 1.5rem 1.75rem;
  }

  .card__name {
    font-size: 1.3rem;
  }
}
