/**
 * Wordmark produit — classes techniques .logo-wordmark.
 * Le nom affiché vient de brand.json displayName (images Iliva via fillBrandMarks, sinon CSS).
 */

:root {
  --ui-font-wordmark: "Comfortaa", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-brand-navy: #062951;
  /* Recette unique iliva — taille et couleur (blanc / navy) seules varient. */
  --ui-wordmark-navy: #0f3558;
  --ui-wordmark-white: #ffffff;
  --ui-wordmark-weight: 700;
  --ui-wordmark-tracking: 0.06em;
  --ui-wordmark-stroke: 0;
  --ui-wordmark-dot: #f5a020;
  --ui-wordmark-dot-size: 0.14em;
  --ui-wordmark-dot-top: 0.04em;
}

/* Icône T + point (PNG transparent) — le navy est le fond CSS, pas le fichier. */
.ui-brand-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-brand-navy, #062951);
  border-radius: 22%;
  overflow: hidden;
}

.ui-brand-app-icon > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.logo-wordmark,
.lh-title-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--ui-font-wordmark);
  font-weight: var(--ui-wordmark-weight, 700);
  font-style: normal;
  font-synthesis: none;
  letter-spacing: var(--ui-wordmark-tracking, 0.06em);
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
  -webkit-text-stroke: 0;
  paint-order: fill;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Bat font-black / tracking-tighter Tailwind sur bandeaux cockpit */
.logo-wordmark.logo-wordmark--on-dark,
.iv-cockpit-topbar .logo-wordmark,
.admin-console .header .logo-wordmark {
  color: var(--ui-wordmark-white, #ffffff);
  -webkit-text-fill-color: var(--ui-wordmark-white, #ffffff);
  font-weight: var(--ui-wordmark-weight, 700) !important;
  letter-spacing: var(--ui-wordmark-tracking, 0.06em) !important;
}

.logo-wordmark.logo-wordmark--on-light,
.lh-title-brand {
  color: var(--ui-wordmark-navy, #0f3558);
  -webkit-text-fill-color: var(--ui-wordmark-navy, #0f3558);
}

.logo-wordmark span.i,
.lh-title-brand span.i {
  position: relative;
  display: inline-block;
  font-size: 1em;
  font-weight: inherit;
  font-style: normal;
  line-height: 1;
}

/* Point des i — orange produit, hampe en ı (sans titulus) */
.logo-wordmark span.i .i-dot,
.lh-title-brand span.i .i-dot {
  position: absolute;
  left: 50%;
  top: var(--ui-wordmark-dot-top, 0.04em);
  width: var(--ui-wordmark-dot-size, 0.14em);
  height: var(--ui-wordmark-dot-size, 0.14em);
  margin-left: calc(var(--ui-wordmark-dot-size, 0.14em) / -2);
  border-radius: 50%;
  background: var(--ui-wordmark-dot, var(--lh-orange, var(--ui-orange, #f5a020)));
  pointer-events: none;
}

.logo-wordmark span.v {
  display: inline-block;
  text-transform: uppercase;
  font-weight: inherit;
  font-style: normal;
  line-height: 1;
  vertical-align: baseline;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.logo-wordmark span.o {
  display: inline-block;
  text-transform: none;
  font-size: 0.93em;
  font-weight: inherit;
  font-style: normal;
  line-height: 1;
  vertical-align: baseline;
  transform: translateY(0.03em);
  color: var(--ui-orange, #f5a020);
  -webkit-text-fill-color: currentColor;
  background: none;
  background-image: none;
  filter: none;
  text-shadow: none;
}

/* Bandeau applicatif + landing header */
.ui-app-topbar-logo .logo-wordmark,
.ui-header-logo .logo-wordmark,
.iv-cockpit-topbar .logo-wordmark,
.admin-console .header .logo-wordmark {
  color: var(--ui-wordmark-white, #ffffff);
  -webkit-text-fill-color: var(--ui-wordmark-white, #ffffff);
  font-size: 1.75rem;
}

.ui-app-topbar-logo .logo-wordmark--text,
.ui-header-logo .logo-wordmark--text,
.iv-cockpit-topbar .logo-wordmark--text,
.admin-console .header .logo-wordmark--text,
.logo-wordmark-wrap .logo-wordmark--text {
  display: inline-flex;
  align-items: center;
}

@media (min-width: 640px) {
  .ui-app-topbar-logo .logo-wordmark,
  .ui-header-logo .logo-wordmark,
  .iv-cockpit-topbar .logo-wordmark,
  .admin-console .header .logo-wordmark {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .ui-app-topbar-logo .logo-wordmark,
  .ui-header-logo .logo-wordmark,
  .iv-cockpit-topbar .logo-wordmark,
  .admin-console .header .logo-wordmark {
    font-size: 2.125rem;
  }
}

.ui-app-topbar-logo:hover .logo-wordmark,
.ui-header-logo:hover .logo-wordmark,
.logo-wordmark-wrap:hover .logo-wordmark,
.admin-console .header .logo-wordmark:hover {
  opacity: 0.92;
}

.logo-wordmark.logo-wordmark--hero-mark,
.ui-wordmark.logo-wordmark {
  display: inline-flex;
  align-items: baseline;
  color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
  font-size: clamp(2.15rem, 8.5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-wordmark.logo-wordmark--on-dark span.o,
.iv-cockpit-topbar .logo-wordmark span.o,
.iv-cockpit-footer .logo-wordmark span.o,
.admin-console .header .logo-wordmark span.o,
.ui-app-topbar-logo .logo-wordmark span.o,
.ui-header-logo .logo-wordmark span.o,
.ui-wordmark.logo-wordmark span.o {
  color: var(--ui-orange, #f5a020);
  -webkit-text-fill-color: currentColor;
}

.logo-wordmark.logo-wordmark--inline-mark {
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.logo-wordmark.logo-wordmark--inline-mark .i {
  font-size: 1em;
  font-weight: inherit;
}

.logo-wordmark.logo-wordmark--accent-o span.v {
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.logo-wordmark.logo-wordmark--accent-o span.o {
  color: var(--ui-orange, #f5a020);
  -webkit-text-fill-color: currentColor;
}

@media (max-width: 480px) {
  .ui-app-topbar-logo .logo-wordmark,
  .ui-header-logo .logo-wordmark {
    font-size: 1.625rem;
  }

  .ui-wordmark.logo-wordmark {
    font-size: clamp(1.95rem, 8vw, 2.85rem);
  }
}

.logo-wordmark:has(> img) {
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0;
}

.logo-wordmark:has(> img) .logo-wordmark-img,
.logo-wordmark:has(> img) .lh-title-brand-img {
  display: block;
}

/* Logo image officiel — landing + bandeau applicatif */
.logo-wordmark-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
}

/* Wordmark image inline (titres, KPI, footers) — remplace le faux-texte CSS .logo-wordmark */
.logo-wordmark-img--inline {
  display: inline-block;
  height: 1.22em;
  width: auto;
  max-width: 8.25em;
  vertical-align: -0.2em;
  object-fit: contain;
}

.ui-app-topbar-logo .logo-wordmark:has(> img),
.ui-header-logo .logo-wordmark:has(> img),
.iv-cockpit-topbar .logo-wordmark:has(> img),
.admin-console .header .logo-wordmark:has(> img),
.logo-wordmark-wrap .logo-wordmark:has(> img) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  height: 2.55rem;
  width: 6.6rem;
  line-height: 0;
}

.logo-wordmark-img--topbar {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 640px) {
  .ui-app-topbar-logo .logo-wordmark:has(> img),
  .ui-header-logo .logo-wordmark:has(> img),
  .iv-cockpit-topbar .logo-wordmark:has(> img),
  .admin-console .header .logo-wordmark:has(> img),
  .logo-wordmark-wrap .logo-wordmark:has(> img) {
    height: 2.7rem;
    width: 7rem;
  }
}

@media (min-width: 768px) {
  .ui-app-topbar-logo .logo-wordmark:has(> img),
  .ui-header-logo .logo-wordmark:has(> img),
  .iv-cockpit-topbar .logo-wordmark:has(> img),
  .admin-console .header .logo-wordmark:has(> img),
  .logo-wordmark-wrap .logo-wordmark:has(> img) {
    height: 2.85rem;
    width: 7.4rem;
  }
}

.logo-wordmark-img--hero {
  height: clamp(2.35rem, 8.5vw, 3.35rem);
  width: auto;
  max-width: min(320px, 82vw);
  margin: 0 auto 1.25rem;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.2));
  user-select: none;
  pointer-events: none;
}

.ui-app-topbar-logo .logo-wordmark-img,
.ui-header-logo .logo-wordmark-img {
  transition: opacity 0.15s ease;
  background: transparent;
}

.ui-app-topbar-logo,
.ui-header-logo {
  background: transparent;
}

.ui-app-topbar-logo:hover .logo-wordmark-img,
.ui-header-logo:hover .logo-wordmark-img {
  opacity: 0.92;
}

@media (max-width: 480px) {
  .logo-wordmark-img--topbar {
    height: 1.7rem;
  }

  .logo-wordmark-img--hero {
    height: clamp(2rem, 8vw, 2.85rem);
    max-width: min(280px, 78vw);
  }
}
