/* ==========================================================================
   PROMPT-AI — CSS
   ========================================================================== */
.ai-kit {
    font-family: sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

/* Icônes (Material Symbols) */
[class^="icon-"],
[class*=" icon-"] {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    white-space: nowrap;
    font-feature-settings: "liga";
}

[class^="icon-"]::before,
[class*=" icon-"]::before {
    display: inline-block;
    font-family: inherit;
    font-variation-settings: "FILL"1, "wght"400, "GRAD"-25, "opsz"48;
    font-feature-settings: "liga";
}

.icon-docs::before {
    content: "docs";
}

.icon-database::before {
    content: "database";
}

.icon-arrow_forward::before {
    content: "arrow_forward";
}

.icon-home::before {
    content: "home";
}

.icon-user::before {
    content: "person";
}

.icon-download::before {
    content: "download";
}

.icon-share::before {
    content: "share";
}

.icon-chevron_down::before {
    content: "expand_more";
}

.icon-checked::before {
    content: "check";
}

.icon-autorenew::before {
    content: "autorenew";
}

.icon-warning::before {
    content: "warning";
}

.icon-info::before {
    content: "info";
}

#ai-demo {
    margin: 0 auto;
    max-width: 768px;
}

/* Variables */
:root {
    --box-background-color: #FFF;
    --box-color: #ffffff;
    --color-white: #fff;
    --color-white-rgb: 255, 255, 255;
    --color-black: #000;
    --color-lavande: #A6ABE6;
    --color-bleu-lilas: #CFD1EB;
    --prompt-border-color: #A6ABE6;
    --prompt-prism-bg: #0b1228;
    --prompt-prism-color: #A6ABE6;
    --success-color: #A5BD95;
    --neutral-color: #CFD1EB;
    --warning-color: #EEA178;
    --avatar-gradient-start: #6f7cff;
    --avatar-gradient-end: #8ad4ff;
    --color-disable: #809194;
    --borderRadius-s: 0.25rem;
    --borderRadius-m: 0.5rem;
    --borderRadius-l: 1rem;
}

/* Prompt */
.ai-kit {
    position: relative;
}

.ai-kit__prompt {
    background: var(--color-white);
    border: solid 1px var(--prompt-border-color);
    color: var(--color-black);
    padding: 0.5em 1.5em;
    border-radius: var(--borderRadius-l);
    transition: all .5s;
    z-index: 1;
    position: relative;
    box-shadow: 0 24px 50px rgba(5, 8, 30, .55);
}

.ai-kit__prompt--prism-automation {
    --send-btn-background: var(--prompt-prism-bg);
    --send-btn-color: var(--prompt-prism-color);
    background: var(--prompt-prism-bg);
    border-color: var(--prompt-prism-color);
    color: var(--prompt-prism-color);
}

.ai-kit__prompt--prism-automation .ai-kit__prompt-text {
    color: inherit;
    opacity: 1;
}

.ai-kit__prompt-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-kit__prompt-box {
    flex: 1;
    min-height: 4.5em;
    display: flex;
    align-items: center;
    width: 100%;
}

.ai-kit__prompt-logo {
    width: 1.5rem;
    height: 1.5rem;
}

.ai-kit__prompt-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ai-kit__send-button {
    height: 2.5rem;
    min-width: 2.5rem;
    pointer-events: none;
    flex-shrink: 0;
    border-radius: var(--borderRadius-s);
    background: var(--send-btn-background, var(--color-bleu-lilas));
    color: var(--send-btn-color, currentColor);
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease;
    display: grid;
    place-content: center;
    position: relative;
    overflow: hidden;
    border: none;
}

.ai-kit__send-button.is-bouncing {
    background: rgba(0, 0, 0, 0);
}

.ai-kit__send-button.is-bouncing .ai-kit__send-dots {
    display: inline-flex;
    opacity: 1;
}

.ai-kit__send-button.is-bouncing .ai-kit__send-dots span {
    animation-play-state: running;
}

.ai-kit__send-button.is-bouncing .ai-kit__send-icon {
    display: none;
    opacity: 0;
}

.ai-kit__send-dots {
    display: none;
    gap: .35rem;
    align-items: flex-end;
    opacity: 0;
    transition: opacity .2s ease;
}

.ai-kit__send-dots span {
    width: .35rem;
    height: .35rem;
    border-radius: 999px;
    background: currentColor;
    opacity: .6;
    animation: sendButtonBounce .8s ease-in-out infinite;
    animation-play-state: paused;
}

.ai-kit__send-dots span:nth-child(1) {
    animation-delay: 0s;
}

.ai-kit__send-dots span:nth-child(2) {
    animation-delay: .13s;
}

.ai-kit__send-dots span:nth-child(3) {
    animation-delay: .26s;
}

.ai-kit__send-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
}

.ai-kit__prompt-text {
    display: flex;
    position: relative;
    line-height: 1.5;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
}

.ai-kit__prompt-text::before {
    content: attr(data-placeholder);
    color: var(--color-disable);
    opacity: 0;
    /* transition: opacity .2s ease; */
    position: absolute;
    inset: 0;
    pointer-events: none;
    line-height: 0.2;
}

.ai-kit__prompt-text:empty::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .ai-kit__prompt-box {
        min-height: 5em;
    }

    .ai-kit__prompt {
        padding-top: 1em;
        padding-bottom: 1em;
    }
}

@keyframes sendButtonBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-4px);
    }
}

/* Réponse */
.ai-kit__response {
    padding-top: 2rem;
    margin-top: -2rem;
    z-index: 0;
    height: auto;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent 35px, #000 50px);
            mask-image: linear-gradient(to bottom, transparent 35px, #000 50px);
}

.ai-kit__pre-response {
    min-height: 32px;
    position: absolute;
}

/* Modules */
.ai-module {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--box-background-color) 10%, transparent);
    color: var(--box-color);
    border: 1px solid rgba(var(--color-white-rgb), 0.08);
    box-sizing: border-box;
    height: 0;
    overflow: hidden;
}

.ai-module__title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    opacity: .8;
}

/* text */
.ai-module--text {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ai-module--text .ai-module__text-body {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.ai-module--text .ai-module__icon {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.ai-module--text .ai-module__text {
    flex: 1;
}

/* module-ai */
.ai-module--module-ai {
    padding: 0;
    margin-top: 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--box-background-color) 10%, transparent);
    color: var(--box-color);
    border: 1px solid rgba(var(--color-white-rgb), 0.08);
}

.ai-module--module-ai .module-ai__accordion {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    border-radius: 16px;
    background: transparent;
}

.ai-module--module-ai .module-ai__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
}

.ai-module--module-ai .module-ai__summary {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.ai-module--module-ai .module-ai__summary-text {
    font-weight: 600;
}

.ai-module--module-ai .module-ai__toggle-button {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: hsla(0, 0%, 100%, .08);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s ease;
}

.ai-module--module-ai .module-ai__toggle-icon {
    font-size: 1.1rem;
    transition: transform .35s ease;
    display: inline-flex;
}

.ai-module--module-ai .module-ai__meta {
    display: flex;
    flex-direction: column;
    font-size: .75rem;
    opacity: .7;
    text-align: right;
}

.ai-module--module-ai .module-ai__meta-main {
    font-weight: 500;
}

.ai-module--module-ai .module-ai__note {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: .2rem;
}

.ai-module--module-ai .module-ai__content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.ai-module--module-ai .module-ai__table-body {
    display: flex;
    flex-direction: column;
    gap: .25em;
    max-height: 15em;
    overflow: hidden;
    mask-image: linear-gradient(black 50%, transparent);
    -webkit-mask-image: linear-gradient(black 50%, transparent);
}

.ai-module--module-ai .module-ai__row {
    transition: background .2s ease;
    display: flex;
    align-items: center;
    gap: 1em;
    border-radius: var(--borderRadius-s);
    padding: .25em;
}

.ai-module--module-ai .module-ai__cell {
    display: flex;
    align-items: center;
    flex: 1;
    gap: .5em;
}

.ai-module--module-ai .module-ai__cell--avatar {
    justify-content: flex-start;
    flex: 0;
}

.ai-module--module-ai .module-ai__avatar-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(var(--color-white-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ai-module--module-ai .module-ai__avatar-wrapper--empty {
    background: rgba(var(--color-white-rgb), 0.05);
}

.ai-module--module-ai .module-ai__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

.ai-module--module-ai .module-ai__employee-name {
    font-weight: 600;
}

.ai-module--module-ai .module-ai__department {
    opacity: .75;
    font-size: .85rem;
}

.ai-module--module-ai .module-ai__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .7rem;
    font-weight: 600;
}

.ai-module--module-ai .module-ai__status--warning {
    color: var(--warning-color);
}

.ai-module--module-ai .module-ai__status--success {
    color: var(--success-color);
}

.ai-module--module-ai .module-ai__row--neutral {
    background: hsla(0, 0%, 100%, .02);
}

.ai-module--module-ai .module-ai__row--warning {
    background: rgba(238, 161, 120, .08);
}

.ai-module--module-ai .module-ai__row--success {
    background: rgba(165, 189, 149, .12);
}

.ai-module--module-ai .module-ai__actions {
    margin-top: .75rem;
    display: flex;
    justify-content: flex-end;
}

/* salary-evolution */
.ai-module--salary-evolution {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--box-background-color) 10%, transparent);
    color: var(--box-color);
    border: 1px solid rgba(var(--color-white-rgb), 0.08);
}

.ai-module--salary-evolution .ai-module__title {
    opacity: 1;
}

.ai-module--salary-evolution .salary-evo {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.ai-module--salary-evolution .salary-evo__chart--bars {
    display: flex;
    align-items: end;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ai-module--salary-evolution .salary-evo__bar-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}

.ai-module--salary-evolution .salary-evo__bar {
    position: relative;
    width: 100%;
    min-height: 148px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.ai-module--salary-evolution .salary-evo__bar--actual {
    color: var(--color-white);
}

.ai-module--salary-evolution .salary-evo__bar--forecast {
    color: var(--warning-color);
}

.ai-module--salary-evolution .salary-evo__bar-fill {
    position: absolute;
    inset: auto 0 0 0;
    height: 0;
    box-sizing: border-box;
    background: color-mix(in srgb, currentColor 10%, transparent);
    border-top: 2px solid currentColor;
    transform-origin: bottom center;
}

.ai-module--salary-evolution .salary-evo__bar-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .55rem .3rem 0;
}

.ai-module--salary-evolution .salary-evo__bar-value,
.ai-module--salary-evolution .salary-evo__bar-change {
    position: relative;
    z-index: 1;
    text-align: center;
    font-weight: 600;
}

.ai-module--salary-evolution .salary-evo__bar-value {
    font-size: .75em;
    line-height: 1.1;
}

.ai-module--salary-evolution .salary-evo__bar-change {
    font-size: 1em;
}

.ai-module--salary-evolution .salary-evo__bar-date {
    font-size: .75em;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* employee, salary-simulation, performance-badges */
.ai-module--employee,
.ai-module--salary-simulation,
.ai-module--performance-badges {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--box-background-color) 10%, transparent);
    color: var(--box-color);
    border: 1px solid rgba(var(--color-white-rgb), 0.08);
}

/* table */
.ai-table-wrap {
    overflow: hidden;
    border-radius: 12px;
    background: color-mix(in srgb, currentColor 1%, transparent);
}

.ai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.ai-table th,
.ai-table td {
    padding: 10px 12px;
    text-align: left;
}

.ai-table thead {
    background: var(--color-bleu-lilas);
    color: #000;
}

.ai-table thead th {
    font-weight: 600;
    opacity: .8;
    border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.ai-table tbody tr+tr td {
    border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

/* hbar */
.ai-hbar-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-hbar-chart__row {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.ai-hbar-chart__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ai-hbar-chart__label,
.ai-hbar-chart__value {
    display: block;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
}

.ai-hbar-chart__track {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: color-mix(in srgb, currentColor 10%, transparent);
}

.ai-hbar-chart__fill {
    height: 100%;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    background: #a6abe6;
}

/* source tags */
.ai-source-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-source-tag {
    display: inline-flex;
    align-items: center;
    gap: .25em;
    padding: .25em .5em;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 5%, transparent);
    opacity: 0;
}

.ai-source-tag__icon {
    font-size: .8em;
    display: inline-block;
}

/* employee card */
.ai-employee {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-employee__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-employee__avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: solid 3px #a6abe6;
    background: linear-gradient(135deg, var(--avatar-gradient-start), var(--avatar-gradient-end));
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-employee__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.ai-employee__identity {
    display: flex;
    flex-direction: column;
}

.ai-employee__name {
    font-weight: 600;
}

.ai-employee__role {
    opacity: .7;
}

.ai-employee__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    column-gap: 1em;
    row-gap: .5em;
}

.ai-employee__row {
    display: flex;
    justify-content: space-between;
}

.ai-employee__label {
    opacity: .6;
}

.ai-employee__value {
    font-weight: 500;
}

/* salary sim */
.ai-salary-sim {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-salary-sim__line {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.ai-salary-sim__col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-salary-sim__label {
    font-size: 12px;
    opacity: .65;
}

.ai-salary-sim__value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
}

.ai-salary-sim__arrow {
    font-size: 20px;
    opacity: .7;
}

.ai-salary-sim__delta {
    display: flex;
    justify-content: flex-start;
}

.ai-salary-sim__delta-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(var(--color-white-rgb), 0.08);
    border: 1px solid rgba(var(--color-white-rgb), 0.08);
    font-size: 13px;
    font-weight: 600;
}

/* performance badges */
.ai-performance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-performance-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    background: color-mix(in srgb, currentColor 5%, transparent);
    opacity: 0;
}

.ai-performance-badge--success {
    color: var(--success-color);
}

.ai-performance-badge--neutral {
    color: var(--neutral-color);
}

.ai-performance-badge--warning {
    color: var(--warning-color);
}

/* boutons */
.ai-table__actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    background: color-mix(in srgb, currentColor 5%, transparent);
    color: currentColor;
    opacity: 0;
    border: none;
}

.ai-btn--ghost {
    color: var(--color-disable);
}

.ai-btn__icon {
    display: inline-block;
}

.ai-btn.module-ai__btn-syncing .ai-btn__icon,
.ai-btn__icon.module-ai__icon-spinning {
    animation: module-ai-spin 1.1s linear infinite;
}

@keyframes module-ai-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.module-ai__btn-disabled {
    opacity: .5;
    pointer-events: none;
}