:root {
    --primary: #283276;
    --secondary: #406BDE;
    --third: #69408C;
    --quaternary: #EB94C2;
    --secondary-light: #B0BFEB;
    --btn-primary: #406BDE;
    --btn-primary-hover: #0d47a1;
    --btn-secondary: #69408C;
    --btn-secondary-light: #ECE4F2;
    --btn-secondary-hover: #311b92;
    --btn-third: #283276;
    --white: #fff;
    --bs-body-font-family: 'Marianne', sans-serif;
}

/* Marianne Regular */
/* @font-face {
    font-family: 'Marianne';
    src: url("../fonts/marianne/MARIANNE-REGULAR-aef48b48c13f75c376ce8ead1bb0d7cb.OTF") format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
} */

/* ============================================================
BASE
============================================================ */
body,
html {
    font-family: 'Marianne', sans-serif;
    color: var(--primary) !important;
}

.print-only {
    display: none;
}

/* ============================================================
TYPOGRAPHY
============================================================ */
.fw-600 { font-weight: 600; }

.fs-xs { font-size: 0.85rem; }

.text-primary-own    { color: var(--primary) !important; }
.text-secondary-own  { color: var(--secondary) !important; }
.text-third-own      { color: var(--third) !important; }
.text-quaternary-own { color: var(--quaternary) !important; }


/* ============================================================
BUTTONS — shared base
============================================================ */
.btn-frame,
.btn-frame-square {
    border: none;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: 0.3s;
}

.btn-frame        { padding: 5px 20px;  border-radius: 50px; }
.btn-frame-square { padding: 10px 20px; border-radius: 10px; }


/* BUTTONS — variants */
.btn-primary-own,
.btn-secondary-own,
.btn-third-own { color: var(--white); }

.btn-primary-active,
.btn-secondary-active,
.btn-third-active { background-color: var(--white); }

.btn-primary-own    { background-color: var(--btn-primary); }
.btn-primary-active { color: var(--btn-primary); }
.btn-primary-own:hover { background-color: var(--btn-primary-hover); color: var(--white); }

.btn-secondary-own    { background-color: var(--btn-secondary); }
.btn-secondary-active { color: var(--btn-secondary); }
.btn-secondary-own:hover { background-color: var(--btn-secondary-hover); color: var(--white); }

.btn-third-own    { background-color: var(--btn-third); }
.btn-third-active { color: var(--third); }


/* ============================================================
FORMS
============================================================ */
.form-selector,
.form-select,
select {
    height: 32px;
    min-height: 32px;
    line-height: 1.2;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

.form-selector {
    color: var(--third);
    font-size: 12px;
    border: 1px solid var(--third);
    border-radius: 5px;
    padding: 0 28px 0 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white;
    background-repeat: no-repeat;
    background-position: calc(100% - 8px) center;
    background-size: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2369408C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-selector-publi {
    color: var(--primary);
    font-size: 12px;
    border: 1px solid var(--primary);
}

.clear-button {
    position: absolute;
    right: 10px;
    top: 52%;
    transform: translateY(-50%);
    cursor: pointer;
}

.filter-stack,
.filter-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.filter-stack { flex-direction: column; }
.filter-row   { flex-direction: row; align-items: stretch; }

.filter-control { min-width: 0; flex: 1 1 0; }

.filter-control-mobile {
    border: 1px solid var(--primary);
    border-radius: 0.25rem;
    padding: 0.75rem;
    color: var(--primary);
    font-size: 12px;
}


/* ============================================================
LAYOUT & PANELS
============================================================ */
.panel {
    padding: 20px;
    border: 1px solid var(--primary);
    border-radius: 20px;
}

hr {
    border: none;
    border-top: 1px solid var(--third);
}

.title-decoration {
    position: absolute;
    z-index: -1;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 15px;
    background-color: #FFEFB4;
    border-radius: 20px;
}

.custom-offcanvas {
    height: auto !important;
    max-height: 90vh;
}

.keyword-dropdown-menu {
    min-width: fit-content;
    width: max-content;
    max-width: calc(100vw - 2rem);
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.10rem;
    border-radius: 0;
}

.keyword-dropdown-menu .keyword-list { max-width: 100%; }


/* ============================================================
CHARTS
============================================================ */
.chart-caption    { width: 70%; text-align: center; }
.chart-caption-2  { flex-grow: 1; text-align: left; }

.chart-territory,
.chart-territory-2 { width: 15%; }

.chart-territory   { text-align: left; }
.chart-territory-2 { text-align: right; }

@media (max-width: 575px) {
    .chart-caption,
    .chart-caption-2,
    .chart-territory,
    .chart-territory-2 {
        width: 100%;
        text-align: center;
    }
}

.chart-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}
.chart-inner {
    height: 260px; /* or whatever your fixed height is */
    position: relative;
}
#empChart {
    width: 100% !important;
    height: 100% !important;
}

.donut-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
}

.donutchart-print {
    width: 100%;
    height: 100%;
}

.donut-center-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    text-align: center;
}

.donut-center-label > span {
    transform: translateX(3px);
}

.donut-center-label > span {
    transform: translateY(3px);
}

.google-visualization-tooltip {
    pointer-events: none;
}

/* ============================================================
ICONS & MISC
============================================================ */
.square {
    width: 15px;
    height: 15px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.evolution-icon {
    width: 15px;
    height: 15px;
    margin-bottom: 5px;
}

.turbo-progress-bar { height: 10px; }

/* ============================================================
TOOLTIPS
============================================================ */
.custom-tooltip .tooltip-inner {
    background-color: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    max-width: 320px;
    text-align: left;
}

.custom-tooltip .tooltip-arrow { display: none; }

.custom-tooltip.bs-tooltip-top    .tooltip-arrow::before { border-top-color:    var(--primary); }
.custom-tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--primary); }
.custom-tooltip.bs-tooltip-start  .tooltip-arrow::before { border-left-color:   var(--primary); }
.custom-tooltip.bs-tooltip-end    .tooltip-arrow::before { border-right-color:  var(--primary); }

.reset-this {
    animation: none;
    animation-delay: 0;
    animation-direction: normal;
    animation-duration: 0;
    animation-fill-mode: none;
    animation-iteration-count: 1;
    animation-name: none;
    animation-play-state: running;
    animation-timing-function: ease;
    backface-visibility: visible;
    background: 0;
    background-attachment: scroll;
    background-clip: border-box;
    background-color: transparent;
    background-image: none;
    background-origin: padding-box;
    background-position: 0 0;
    background-position-x: 0;
    background-position-y: 0;
    background-repeat: repeat;
    background-size: auto auto;
    border: 0;
    border-style: none;
    border-width: medium;
    border-color: inherit;
    border-bottom: 0;
    border-bottom-color: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-style: none;
    border-bottom-width: medium;
    border-collapse: separate;
    border-image: none;
    border-left: 0;
    border-left-color: inherit;
    border-left-style: none;
    border-left-width: medium;
    border-radius: 0;
    border-right: 0;
    border-right-color: inherit;
    border-right-style: none;
    border-right-width: medium;
    border-spacing: 0;
    border-top: 0;
    border-top-color: inherit;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top-style: none;
    border-top-width: medium;
    bottom: auto;
    box-shadow: none;
    box-sizing: content-box;
    caption-side: top;
    clear: none;
    clip: auto;
    color: inherit;
    columns: auto;
    column-count: auto;
    column-fill: balance;
    column-gap: normal;
    column-rule: medium none currentColor;
    column-rule-color: currentColor;
    column-rule-style: none;
    column-rule-width: none;
    column-span: 1;
    column-width: auto;
    content: normal;
    counter-increment: none;
    counter-reset: none;
    cursor: auto;
    direction: ltr;
    display: inline;
    empty-cells: show;
    float: none;
    font: normal;
    font-family: inherit;
    font-size: medium;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    height: auto;
    hyphens: none;
    left: auto;
    letter-spacing: normal;
    line-height: normal;
    list-style: none;
    list-style-image: none;
    list-style-position: outside;
    list-style-type: disc;
    margin: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    max-height: none;
    max-width: none;
    min-height: 0;
    min-width: 0;
    opacity: 1;
    orphans: 0;
    outline: 0;
    outline-color: invert;
    outline-style: none;
    outline-width: medium;
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    page-break-after: auto;
    page-break-before: auto;
    page-break-inside: auto;
    perspective: none;
    perspective-origin: 50% 50%;
    position: static;
    /* May need to alter quotes for different locales (e.g fr) */
    quotes: '\201C' '\201D' '\2018' '\2019';
    right: auto;
    tab-size: 8;
    table-layout: auto;
    text-align: inherit;
    text-align-last: auto;
    text-decoration: none;
    text-decoration-color: inherit;
    text-decoration-line: none;
    text-decoration-style: solid;
    text-indent: 0;
    text-shadow: none;
    text-transform: none;
    top: auto;
    transform: none;
    transform-style: flat;
    transition: none;
    transition-delay: 0s;
    transition-duration: 0s;
    transition-property: none;
    transition-timing-function: ease;
    unicode-bidi: normal;
    vertical-align: baseline;
    visibility: visible;
    white-space: normal;
    widows: 0;
    width: auto;
    word-spacing: normal;
    z-index: auto;
    /* basic modern patch */
    all: initial;
    all: unset;
}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 200px;
}
