:root {
  --matisse-navy: #17364c;
  --matisse-blue: #0f56b8;
  --matisse-cyan: #42d9ff;
  --matisse-red: #f5333f;
}

.matisse-symbol {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  width: 38px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 10px;
  background: var(--matisse-navy);
  box-shadow: 0 5px 14px rgba(10, 38, 66, .18), 0 0 0 2px rgba(61, 212, 255, .08);
}

.matisse-symbol::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(61, 212, 255, .2);
  content: "";
  pointer-events: none;
}

.matisse-symbol img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand {
  gap: 12px;
}

.brand .matisse-symbol {
  width: 39px;
  height: 37px;
}

.brand.inverse .matisse-symbol {
  border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .25), 0 0 0 3px rgba(66, 217, 255, .08);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy b {
  color: #165fa5;
}

.brand-copy small {
  margin-top: 5px;
  color: #667d87;
  font: 700 8px/1.1 "DM Sans", sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.inverse .brand-copy small {
  color: #86a8ad;
}

/* Accueil public */
.hero-visual {
  height: 462px;
  border: 1px solid rgba(23, 54, 76, .08);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px),
    radial-gradient(circle at 70% 24%, rgba(51, 161, 220, .15), transparent 32%),
    linear-gradient(145deg, #edf3f2, #dfe9e8);
  background-size: 32px 32px, 32px 32px, auto, auto;
  isolation: isolate;
}

.matisse-hero-card {
  position: absolute;
  inset: 18px 32px 18px 22px;
  overflow: hidden;
  border: 1px solid rgba(120, 196, 229, .28);
  border-top: 3px solid var(--matisse-red);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(66, 217, 255, .14), transparent 30%),
    linear-gradient(145deg, #17364c, #102d45);
  box-shadow: 0 24px 58px rgba(8, 37, 57, .21), 0 0 0 6px rgba(255, 255, 255, .42);
  transform: rotate(-.45deg);
}

.matisse-hero-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 60%, rgba(6, 25, 43, .84) 100%),
    linear-gradient(110deg, rgba(255, 255, 255, .07), transparent 30%);
  content: "";
}

.matisse-hero-image {
  position: absolute;
  top: 4%;
  right: 8%;
  display: block;
  width: 76%;
  height: 79%;
  object-fit: contain;
  object-position: center;
}

.matisse-hero-caption {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 19px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
}

.matisse-hero-caption span {
  display: flex;
  flex-direction: column;
}

.matisse-hero-caption b {
  font: 800 16px/1.15 Manrope, sans-serif;
}

.matisse-hero-caption small {
  margin-top: 5px;
  color: #c9eaf4;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.matisse-hero-caption i {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(8, 35, 60, .62);
  color: #7de8ff;
  font: 800 9px/1 "DM Sans", sans-serif;
  font-style: normal;
  letter-spacing: .1em;
  white-space: nowrap;
}

.hero-visual .float-card {
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 7px;
  backdrop-filter: blur(9px);
  box-shadow: 0 12px 28px rgba(9, 47, 53, .13);
  font-size: 11px;
}

.hero-visual .fc-one {
  top: 14%;
  bottom: auto;
  left: -3%;
  padding: 10px 14px;
}

.hero-visual .fc-one b {
  font-size: 21px;
}

.hero-visual .fc-two {
  right: -2%;
  top: 14%;
}

/* Application connectée */
.matisse-welcome {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px 12px 6px 7px;
  border: 1px solid #d4e1e3;
  border-top: 2px solid rgba(245, 51, 63, .72);
  border-radius: 13px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 34px rgba(9, 47, 53, .08);
}

.matisse-welcome .matisse-symbol {
  width: 43px;
  height: 40px;
  border-radius: 10px;
}

.matisse-welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.matisse-welcome-copy b {
  font: 800 12px/1.2 Manrope, sans-serif;
  letter-spacing: .09em;
}

.matisse-welcome-copy small {
  margin-top: 4px;
  color: #5d787c;
  font-size: 9px;
}

.message.ai::before {
  box-sizing: border-box;
  border: 1px solid rgba(15, 86, 184, .22);
  border-radius: 8px;
  background: var(--matisse-navy) url("images/matisse-ia-symbol.png") center / cover no-repeat;
  box-shadow: 0 5px 13px rgba(12, 46, 75, .2);
  color: transparent;
  content: "";
}

.response-masthead {
  background:
    linear-gradient(100deg, rgba(23, 54, 76, .98), rgba(11, 70, 107, .97)),
    var(--matisse-navy);
  border-bottom-width: 2px;
  border-bottom-color: #ef3e47;
}

.response-seal {
  overflow: hidden;
  width: 34px;
  height: 32px;
  border-radius: 8px;
  background: var(--matisse-navy);
  box-shadow: 0 4px 13px rgba(0, 0, 0, .22);
}

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

.response-masthead i {
  color: #77e4ff;
}

/* Connexion, compte et administration */
.auth-card > .brand,
.admin-header .brand {
  width: fit-content;
}

.auth-card > .brand {
  margin: -8px 0 29px;
  padding: 8px 13px 8px 8px;
  border: 1px solid #d6e4e1;
  border-top: 2px solid rgba(245, 51, 63, .7);
  border-radius: 13px;
  background: linear-gradient(135deg, #f7fbfa, #edf5f3);
  box-shadow: 0 12px 32px rgba(9, 47, 53, .08);
}

.auth-card > .brand .matisse-symbol {
  width: 47px;
  height: 44px;
  border-radius: 11px;
}

.admin-header .brand .matisse-symbol {
  width: 42px;
  height: 39px;
}

@media (max-width: 850px) {
  .hero-visual {
    display: block;
    height: 380px;
    margin: 10px 0 0;
  }

  .matisse-hero-card {
    inset: 16px;
  }
}

@media (max-width: 520px) {
  .public-nav .brand-copy small,
  .sidebar .brand-copy small {
    display: none;
  }

  .hero-visual {
    height: 310px;
    border-radius: 25px;
  }

  .matisse-hero-card {
    inset: 9px;
    border-radius: 18px;
  }

  .matisse-hero-image {
    right: 7%;
    width: 82%;
    height: 80%;
  }

  .matisse-hero-caption {
    right: 16px;
    bottom: 15px;
    left: 16px;
  }

  .matisse-hero-caption i {
    display: none;
  }

  .hero-visual .fc-one {
    display: none;
  }

  .hero-visual .fc-two {
    right: -3%;
    top: 10%;
  }

  .matisse-welcome {
    margin-bottom: 5px;
  }
}
