:root {
  --primary: #4caf50;
  --secondary: #2c3e50;
  --font-family: "Montserrat", sans-serif;

  --bg: #f6f7fb;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/*  Root + Typo guardrails */
.lc-root {
  font-family: var(--font-family);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--secondary);
  background:
    radial-gradient(
      900px 520px at 12% -10%,
      rgba(0, 0, 0, 0.06),
      transparent 60%
    ),
    radial-gradient(
      1000px 600px at 92% 0%,
      rgba(0, 0, 0, 0.05),
      transparent 55%
    ),
    var(--bg);

  --social-justify: center;

  /* Typo guardrails */
  --lh-base: 1.25;
  --lh-tight: 1.1;

  /* tailles fluides */
  --fs-name: clamp(18px, 4.6vw, 26px);
  --fs-role: clamp(13px, 3.2vw, 15px);
  --fs-section-title: clamp(15px, 3.4vw, 17px);
  --fs-action-title: clamp(14px, 3.4vw, 16px);
  --fs-action-sub: clamp(12px, 3vw, 14px);
  --fs-file-name: clamp(12px, 3vw, 14px);

  line-height: var(--lh-base);
}

.lc-root.align-left {
  --social-justify: flex-start;
}
.lc-root.align-center {
  --social-justify: center;
}
.lc-root.align-right {
  --social-justify: flex-end;
}

.lc-root.safe-font {
  --lh-base: 1.18;
  --lh-tight: 1.05;
  --fs-name: clamp(17px, 4.3vw, 24px);
  --fs-role: clamp(12px, 3vw, 14px);
  --fs-section-title: clamp(14px, 3.2vw, 16px);
  --fs-action-title: clamp(13px, 3.1vw, 15px);
  --fs-action-sub: clamp(12px, 2.8vw, 13px);
  --fs-file-name: clamp(12px, 2.8vw, 13px);
  letter-spacing: 0;
}

.lc-root * {
  font-family: inherit;
}

/* hero */
.lc-hero {
  position: relative;
  padding: 18px 18px 0;
  overflow: hidden;
  isolation: isolate;
}

.lc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary);
}

.lc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* Bannière */
.lc-banner {
  position: relative;
  z-index: 2;
  height: 170px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.lc-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
}

/* bloc identité */
.lc-hero-inner {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 110px 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  align-items: center;
}

/* Fond derrière la photo, contenu au-dessus */
.lc-hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  z-index: 2;
  pointer-events: none;
}

.lc-hero-inner > * {
  z-index: 3;
}

/* Gestion overlap */
.lc-hero.has-banner .lc-hero-inner {
  margin-top: -34px;
}
.lc-hero.no-banner .lc-hero-inner {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Avatar */
.lc-avatar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lc-avatar {
  width: 92px;
  height: 92px;
  border: 3px solid var(--secondary);
  background: var(--primary);
}

/* Identité */
.lc-identity {
  min-width: 0;
  color: var(--secondary);
}

.lc-identity--full {
  grid-column: 1 / -1;
}

/* Nom / métier robustes */
.lc-name {
  margin: 0;
  font-size: var(--fs-name);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.2px;
  line-height: var(--lh-tight);

  overflow-wrap: anywhere;
  word-break: break-word;
}

.lc-role {
  margin: 0.25rem 0 0;
  font-weight: 550;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  font-size: var(--fs-role);
  line-height: 1.15;

  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Social btn */
.lc-social {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: var(--social-justify);
  margin-top: 6px;
}

.lc-social-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: var(--secondary);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(0, 0, 0, 0.18);
}
.lc-social-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Main */
.lc-main {
  width: min(560px, 100%);
  margin: 18px auto 0;
  padding: 0 18px 18px;
  flex: 1;
}

/* Section card */
.lc-section {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  margin-top: 14px;
}

.lc-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

.lc-section-title {
  margin: 0;
  font-size: var(--fs-section-title);
  font-weight: 900;
  color: color-mix(in srgb, var(--primary) 90%, #000 10%);
  line-height: var(--lh-tight);
  min-width: 0;

  overflow-wrap: anywhere;
  word-break: break-word;
}

.lc-section-hint {
  font-size: 0.85rem;
  opacity: 0.72;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions */
.lc-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lc-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--primary);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;

  min-width: 0;
}

.lc-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.08);
}

.lc-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 18%, #fff 82%);
  flex: 0 0 auto;
}

.lc-action-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.lc-action-title {
  font-weight: 900;
  line-height: var(--lh-tight);
  font-size: var(--fs-action-title);

  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.lc-action-sub {
  opacity: 0.72;
  font-size: var(--fs-action-sub);
  line-height: 1.15;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}

.lc-chevron {
  opacity: 0.55;
  flex: 0 0 auto;
}

/* Focus */
.lc-action:focus,
.lc-social-btn:focus,
.lc-cta:focus,
.lc-file:focus,
.lc-footer-link:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 70%, #fff 30%);
  outline-offset: 3px;
}

/* Fichiers */
.lc-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lc-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--secondary);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;

  min-width: 0;
}

.lc-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.08);
}

.lc-file-badge {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--secondary) 12%, #fff 88%);
  color: color-mix(in srgb, var(--secondary) 78%, #000 22%);
  flex: 0 0 auto;
}

.lc-file-name {
  font-weight: 800;
  font-size: var(--fs-file-name);

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Save contact sticky */
.lc-sticky {
  position: sticky;
  bottom: 10px;
  z-index: 10;
  padding: 0 18px 14px;
}

.lc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--secondary);
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--primary);
  text-decoration: none;
  font-weight: 950;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.18s ease,
    filter 0.18s ease;

  min-width: 0;
}

.lc-cta:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}
.lc-cta-ex {
  --bs-btn-hover-color: var(--primary);
  --bs-btn-hover-bg: var(--secondary);
  --bs-btn-hover-border-color: rgba(0, 0, 0, 0.1);
  --bs-btn-active-color: var(--primary);
  --bs-btn-active-bg: var(--secondary);
  --bs-btn-active-border-color: rgba(0, 0, 0, 0.1);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--primary);
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--secondary);
  text-decoration: none;
  font-weight: 950;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);

  min-width: 0;
}

.exchange svg {
  width: 20px;
}

/* modale d'échange de coordonnées */
body.lc-modal-open {
  overflow: hidden;
}

#echange.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

#echange.modal.is-open {
  display: flex;
}

#echange .sheet {
  width: min(560px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
  animation: lc-sheet-in 0.22s ease-out;
}

@keyframes lc-sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#echange .handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  margin: 4px auto 16px;
}

#echange .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#echange .sheet-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  color: var(--primary);
}

#echange .close {
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  padding: 4px 8px;
}

#echange .field {
  margin-bottom: 14px;
  text-align: left;
}

#echange .field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

#echange .field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 1rem;
}

#echange .field input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

#echange .btn.submit {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  border: none;
}

/* footer */
.lc-footer {
  padding: 16px 0 24px;
}

.lc-footer-link {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: color-mix(in srgb, var(--secondary) 75%, #000 25%);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.18s ease;

  min-width: 0;
}

.lc-footer-link:hover {
  opacity: 0.8;
}

.logo-leaf {
  width: 30px;
  height: auto;
}

/* Avatar */
.avatar {
  width: 90px;
  height: 90px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0;
}

.profile-picture {
  border-radius: 999px;
}
.avatar-logo {
  background-size: contain;
}

/* responsive */
@media (max-width: 520px) {
  .lc-hero {
    padding: 14px;
  }
  .lc-banner {
    height: 150px;
  }
  .lc-hero-inner {
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
  }

  .lc-main {
    padding: 0 14px 14px;
  }
  .lc-files {
    grid-template-columns: 1fr;
  }

  .lc-social {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    row-gap: 10px;
    margin-top: 6px;
  }
}

/* desktop */
@media (min-width: 521px) {
  .lc-hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    justify-items: center;
    text-align: center;
  }

  .lc-avatar-wrap {
    grid-row: 1;
  }
  .lc-identity {
    grid-row: 2;
  }
  .lc-social {
    grid-row: 3;
  }
}

@supports not (color: color-mix(in srgb, #000 50%, #fff 50%)) {
  .lc-icon {
    background: rgba(255, 255, 255, 0.85);
  }
  .lc-file-badge {
    background: rgba(255, 255, 255, 0.85);
  }
  .lc-section-title {
    color: var(--secondary);
  }
  .lc-footer-link {
    color: var(--secondary);
  }
}

/* Sélecteur de langue */
.lc-lang-switcher {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.lc-lang-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1;
}

.lc-lang-btn:hover {
  color: #fff;
}

.lc-lang-btn.active {
  color: #fff;
}

.lc-lang-sep {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1;
  user-select: none;
}
