:root {
    --bayrol-yellow: #FFEA80;
    --bayrol-blue-light: #D5ECEF;
    --bayrol-blue-light-transparent: #D5ECEF4D;
    --bayrol-blue-dark: #00384F;
    --rounded-container-radius: 24px;
}

body {
    background: #009aa6 !important;
    margin: 0;
}

.cursor-pointer {
    cursor: pointer;
}

/* field with blue label (like on login page) */
.blue label.form-label {
    margin-bottom: 0.1rem;
    color: var(--bs-primary);
    margin-left: 10px;
}

/* normal field */
label.form-label {
    color: var(--bayrol-blue-dark);
    font-weight: bold;
}

db-field input.form-control {
    border-color: var(--bs-info) ;
}

db-field[readonly="true"] label.form-label {
    margin-left: 0px;
}

input.form-control::placeholder {
  color: var(--bs-gray-600);
}

/* input password loaded in global to load once only*/
.password-wrapper {
    position: relative;
    width: 100%;
}
.password-wrapper input {
    padding-right: 45px;
}
.eye-icon {
    width: 20px;
    height: 20px;
    display: none;
}
.eye-icon.active {
    display: block;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 25px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.was-validated .btn-toggle-password {
    right: 35px;
}
.btn-toggle-password:hover svg path {
    stroke: #0dcaf0;
}
/* end password input */

/* custom button primary */

.btn.btn-primary {
    background: radial-gradient(50% 50% at 50% 50%, #00B7C5 0%, #009AA6 100%);
    border: 1px solid #FFFFFF;
    box-shadow: 0px 4px 12px 0px #00384F2B;
}

.btn.btn-primary:disabled, .btn.btn-primary.disabled, fieldset:disabled .btn.btn-primary {
    background: var(--bs-info);
    opacity: 1;
    border: 1px solid #FFFFFF;
}

.btn.btn-outline-info {
    --bs-btn-color: #888888;
}

/* choix field height */
.form-bootstrap5 .choices div.choices__inner {
    min-height: 47px;
    max-height: 47px;
}
.form-bootstrap5 .choices[data-type*=select-one] div.choices__inner {
    padding: 0.75rem 0.75rem;
}

/*  tips thumbnails */

.conseil-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    background: white;
}

.conseil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img-wrapper {
    position: relative;
    height: 120px;
    overflow: hidden;
    border-radius: 10px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    color: var(--bs-primary);
    padding: 4px 8px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.7rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conseil-card .card-body {
    background: white;
}

.conseil-card .card-title {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.section-tips {
    gap: 15px;
}

.section-tips .col {
    flex-basis: calc(50% - 7.5px);
    flex-grow: 0;
}
/* end tips thumbnails */

.rounded-container {
    background: white;
    border-radius: var(--rounded-container-radius) var(--rounded-container-radius) 0 0;
    padding: 40px var(--rounded-container-radius);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.rounded-container-title {
    margin: -40px -24px 40px -24px;
    border-radius: var(--rounded-container-radius) var(--rounded-container-radius) 0 0;
}

.rounded-card {
    border-radius: var(--rounded-container-radius);
    padding: 20px;
    background: white;
    margin-bottom: 20px;
}

/* diags */



.diags-container {
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22146%22%20height%3D%22164%22%20viewBox%3D%220%200%20146%20164%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20cx%3D%22132%22%20cy%3D%2232%22%20r%3D%22107%22%20stroke%3D%22url(%23paint0_linear_424_4762)%22%20stroke-opacity%3D%220.28%22%20stroke-width%3D%2250%22%2F%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22paint0_linear_424_4762%22%20x1%3D%22329%22%20y1%3D%22203.5%22%20x2%3D%22-5.67147e-06%22%20y2%3D%22-26%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22white%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22white%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: top right;
    height: 100%;
    overflow: auto;
    background-color: var(--bs-primary);
}
.diags-container h1 {
    text-align: center;
    margin-top: 40px;
    color: white;
    font-size: 1.25rem;
}

/* end diags */

/* bg decoration */

/* SVG Background Decorations */
.bg-top-right-circle::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 0px;
    width: 146px;
    height: 164px;
    opacity: 1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="146" height="164" viewBox="0 0 146 164" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="132" cy="32" r="107" stroke="url(%23paint0_linear_532_6782)" stroke-width="50"/><defs><linearGradient id="paint0_linear_532_6782" x1="329" y1="203.5" x2="-5.67147e-06" y2="-26" gradientUnits="userSpaceOnUse"><stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient></defs></svg>');
    background-repeat: no-repeat;
}

.bg-top-right-circle-profile {
    background: var(--bs-info);
}
.bg-top-right-circle-profile::before {
    background-image: url('data:image/svg+xml;utf8,<svg width="146" height="164" viewBox="0 0 146 164" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="132" cy="32" r="107" stroke="url(%23paint0_linear_653_5951)" stroke-width="50"/><defs><linearGradient id="paint0_linear_653_5951" x1="329" y1="203.5" x2="-5.67147e-06" y2="-26" gradientUnits="userSpaceOnUse"><stop stop-color="%23009AA6"/><stop offset="1" stop-color="%23009AA6" stop-opacity="0"/></linearGradient></defs></svg>');
}
.bg-top-right-circle-help {
    background: linear-gradient(180deg, #009AA6 0%, #FFFFFF 36.14%);
}
.bg-top-right-circle-help::before {
    left: 0;
    width: 190px;
    background-image: url('data:image/svg+xml;utf8,<svg width="188" height="164" viewBox="0 0 188 164" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="56" cy="32" r="107" transform="rotate(-180 56 32)" stroke="url(%23paint0_linear_643_3820)" stroke-width="50"/><defs><linearGradient id="paint0_linear_643_3820" x1="253" y1="203.5" x2="-76" y2="-26" gradientUnits="userSpaceOnUse"><stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0"/></linearGradient></defs></svg>');
}

.bg-bottom-left-circle::after {
    content: '';
    position: absolute;
    bottom: 50px;
    left: 0px;
    width: 172px;
    height: 264px;
    opacity: 1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="172" height="264" viewBox="0 0 172 264" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="132" r="107" stroke="url(%23paint0_linear_532_6784)" stroke-width="50"/><defs><linearGradient id="paint0_linear_532_6784" x1="237" y1="303.5" x2="-92" y2="74" gradientUnits="userSpaceOnUse"><stop stop-color="white"/><stop offset="1" stop-color="white" stop-opacity="0.5"/></linearGradient></defs></svg>');
    background-repeat: no-repeat;
}

.bg-top-right-circle>div{
    position: relative;
    z-index: 1;
}

/* checkbox mypoolexpert style */
.mpe-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0px;
}

.form-label.mpe-checkbox-label {
    margin-bottom: 0;
}

/* Masquer la checkbox native */
.mpe-toggle-checkbox {
    display: none;
}

/* Style du toggle switch */
.mpe-toggle-switch {
    position: relative;
    width: 60px;
    height: 28px;
    background-color: #0891b2;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Le cercle blanc à l'intérieur */
.mpe-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 36px;
    height: 22px;
    background-color: white;
    border-radius: 11px;
    transition: transform 0.3s ease;
}

/* État non coché */
.mpe-toggle-checkbox:not(:checked) + .mpe-toggle-switch {
    background-color: #e5e7eb;
}

.mpe-toggle-checkbox:not(:checked) + .mpe-toggle-switch::after {
    transform: translateX(-18px);
}

/* Effet hover */
.mpe-toggle-switch:hover {
    opacity: 0.9;
}

/* État désactivé */
.mpe-toggle-checkbox:disabled + .mpe-toggle-switch {
    opacity: 0.5;
    cursor: not-allowed;
}

.mpe-toggle-checkbox:disabled + .mpe-toggle-switch:hover {
    opacity: 0.5;
}

/* radio mypoolexpert style */
.mpe-radio-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    justify-content: center;
}

.was-validated .mpe-radio-container :invalid ~ .invalid-feedback {
    position: absolute;
    bottom: -20px;
    left: 0;
}


.mpe-radio-option input[type="radio"],
.mpe-radio-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mpe-radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 146px;
    height: 92px;
    background: var(--bayrol-blue-light-transparent);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.mpe-radio-option input[type="radio"]:checked + .mpe-radio-label,
.mpe-radio-option input[type="checkbox"]:checked + .mpe-radio-label {
    background: var(--bs-warning);
    border-color: transparent;
    box-shadow: 0px 4px 12px 0px #00384F2B;
}

.mpe-radio-label img {
    margin: 7px 5px;
    height: 50px;
}

.mpe-radio-label-text {
    font-size: 15px;
    font-weight: 400;
    color: var(--bayrol-blue-dark);
    margin-bottom: 5px;
}

.mpe-radio-label:hover {
    transform: translateY(-2px);
}

/* style text */

db-field[text-choice] .mpe-radio-option {
    width: 100%;
}

db-field[text-choice] .mpe-radio-label {
    width: 100%;
    height: 44px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--bs-info);
}

db-field[text-choice-inline] .mpe-radio-option {
    width: auto;
}
db-field[text-choice-inline] .mpe-radio-label {
    width: auto;
    height: auto;
    padding: 8px 28px;
}
db-field[text-choice-inline] .mpe-radio-label-text {
    margin-bottom: 0;
}

db-field[text-choice-inline] .mpe-radio-container {
    gap: 15px;
}

db-field[text-choice-inline][text-choice-inline-square] .mpe-radio-label {
    width: auto;
    height: 44px;
    padding: 8px 28px;
    background: white;
    border: 1px solid var(--bs-info);
    border-radius: 16px;
}

db-field[text-choice-inline][text-choice-inline-square] .mpe-radio-option {
    flex-grow: 1;
}

/* end radio style*/

/* Chevron icon for collapse */
.chevron-icon {
    display: inline-block;
    width: 11px;
    height: 7px;
    background-image: url('data:image/svg+xml;utf8,<svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.4529 0.20663C10.7285 0.482197 10.7285 0.928978 10.4529 1.20454L5.32981 6.32764L0.206722 1.20454C-0.0688446 0.928977 -0.0688449 0.482195 0.206721 0.206629C0.482288 -0.0689372 0.929069 -0.0689376 1.20464 0.206629L5.32981 4.33181L9.455 0.20663C9.73056 -0.0689365 10.1773 -0.0689364 10.4529 0.20663Z" fill="%2300384F"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

[aria-expanded="false"] .chevron-icon {
    transform: rotate(180deg);
}

/* end chevron */

/* styles for slider widget */

.slider-item {
    margin-bottom: 40px;
}

.disabled .slider-track {
    filter: grayscale(0.9);
}

.mpe-slider-header {
    display: flex;
    align-items: center;
    margin-bottom: -20px;
    gap: 5px;
}

.mpe-slider-title {
    font-weight: 400;
}

.mpe-slider-title-optionnal {
    font-size: 0.65rem;
    font-weight: normal;
    color: var(--bs-secondary);
    margin-top: 3px;
}

.mpe-slider-value {
    background: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.9375rem;
    font-weight: 700;
    width: auto;
    text-align: center;
    border: 1px solid var(--bs-info);
    transition: all 0.2s ease;
    cursor: text;
    outline: none;
    margin-left: auto;
}

.disabled .mpe-slider-value {
    font-weight: normal;
    border: none;
    color: var(--bs-secondary);
    font-size: 0.7rem;
    padding-right: 0;
}

.mpe-slider-value::-webkit-outer-spin-button,
.mpe-slider-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mpe-slider-value[type=number] {
    -moz-appearance: textfield;
}

.slider-wrapper {
    position: relative;
    padding: 25px 0;
    touch-action: none;
}

.slider-track {
    position: relative;
    height: 6px;
    border-radius: 10px;
    cursor: pointer;
}

.slider-track::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    bottom: -15px;
    cursor: pointer;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    cursor: grab;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    z-index: 10;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-thumb:active,
.slider-thumb.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 30px rgba(0,0,0,0.25);
}

.slider-thumb::before {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* end slider widget */

/* inline field */

.inline-mpe-field {
    margin-bottom: 10px;
}

.inline-mpe-field .form-bootstrap5 {
    margin-bottom: 0 !important;
}

.inline-mpe-field label {
    margin-bottom: 0;
}
.inline-mpe-field input {
    height: 36px;
    width: 130px;
    border-radius: 12px;
    text-align: right;
}
.small-mpe-field input {
    height: 36px;
    border-radius: 12px;
    text-align: right;
}
/* end inline field */

/* stacker drawer style */

.viewz-stack-bottom.show {
    border-radius: 25px 25px 0 0;
}
.viewz-stack-bottom.stack-help {
    border-radius: 0;
    z-index: 2 !important;
}

.viewz-stack-overlay:has(+ .viewz-stack-bottom.stack-help) {
    z-index: 1 !important;
}

/* end stacker */

.basin-block {
    width: 100px ;
    cursor: pointer;
}

.basin-block .img-basin {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* webchat */

.bpFab {
    display: none;
}

/* BACKOFFICE */

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: white;
    --sidebar-hover: var(--bs-primary);
    --sidebar-active: var(--bs-primary);;
    --sidebar-text-active: #ffffff;
    --transition-speed: 0.35s;
    --shadow-elevation: 0 10px 40px rgba(0, 0, 0, 0.3);
}
