/* Reset CSS de base */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
    min-width: 490px;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Reset pour les éléments de formulaire */
input,
select,
textarea {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
    cursor: pointer;
}

/* Reset pour les images */
img {
    border: 0;
    vertical-align: middle;
}

/* Reset pour les liens */
a {
    text-decoration: none;
    color: inherit;
}

/* Reset pour les éléments flottants */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}





/* Style global */
body {
    font-family: "Mulish", sans-serif;
    max-width: calc(100% - 20px);
    margin: auto;
}

/* En-tête */
.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 32px;
}

.header__title {
    font-size: 40px;
    font-weight: 900;
}


.header__nav {

    .nav__list {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;

        .nav__item {
            height: auto;
        }

        .nav__item a {
            display: block;
            border-radius: 8px;
            padding: 8px 8px;
            background-color: #f1f1f1;
            color: #2A2A2A;
            transition: 0.2s ease-in;
        }

        .nav__item a:hover {
            background-color: #2A2A2A;
            color: #f1f1f1;
        }
    }
}

/* Section des outils de couleur */
.main {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px;
}

.color-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.parameters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: stretch;

    .parameters__title {
        font-size: 20px;
        color: #B42539;
        font-weight: bold;

    }


    .parameters__container {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
        padding: 16px;
        background-color: #f1f1f1;
        border-radius: 20px;

    }
}

.original-colors,
.comparison-colors {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.comparison-colors_container,
.original-colors_container {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    align-self: stretch;
}

.comparison-colors_content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.original-colors__title,
.comparison-colors__title {
    font-size: 20px;
    font-weight: normal;
    color: #2A2A2A;
    margin-bottom: auto;
    font-weight: bold;
}

.comparison-colors__subtitle {
    font-size: 18px;
    font-weight: normal;
    color: #2A2A2A;
    margin-bottom: auto;
    font-weight: bold;

}

.original-colors__input-color,
.comparison-colors__input-color {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: 8px;
    height: 40px;
    padding: 0;
    width: 100%;
    border: 1px solid #dbdbdb;
}

.original-colors__input-text,
.comparison-colors__input-text {
    text-align: center;
    padding: 16px 8px;
    border: none;
    border-radius: 8px;
    outline: none;
    color: #2A2A2A;
    font-weight: lighter;
}

::-webkit-color-swatch-wrapper {
    padding: 0;
}

::-webkit-color-swatch {
    border: 0;
    border-radius: 0;
}

::-moz-color-swatch,
::-moz-focus-inner {
    border: 0;
}

::-moz-focus-inner {
    padding: 0;
}

.checkers {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.checker {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.checker__title {
    min-width: 200px;
    font-weight: bold;
}

.checker__input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checker__tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.checker__input-text {
    border: 0;
    cursor: pointer;
    border-radius: 8px;
    height: 40px;
    padding: 0;
    width: 70px;
    text-align: center;
    font-weight: lighter;
}

.checker__input-color {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    cursor: pointer;

    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;

    height: 40px;
    padding: 0;
    width: 50px;
}

.checker__btn {
    width: 65px;
    border-radius: 8px;
    background-color: #2A2A2A;
    color: #ffffff;
    padding: 8px 16px;
    transition: .2s;

    .checker__btn-img {
        width: 20px;
    }

    &.white {
        background-color: #f1f1f1;
        color: #2A2A2A;
    }

    &.black {
        background-color: #2A2A2A;
        color: #ffffff;
    }

    &.red {
        background-color: #B42539;
        color: #ffffff;
    }
}

.checker__btn:hover {
    scale: 0.9;
}

.checker__btn:active {
    scale: 1.1;
}

.checker__ratio {
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    align-items: center;
    min-width: 140px;
    justify-content: center;

    &.true {
        background-color: #EBF7E0;

        #checkerRatioValidated {
            display: block;
            width: 15px;
            height: 15px;
        }

        #checkerRatioRefused {
            display: none;
        }
    }

    &.false {
        background-color: #FAE5E8;

        #checkerRatioRefused {
            display: block;
            width: 15px;
            height: 15px;

        }

        #checkerRatioValidated {
            display: none;
        }
    }
}

.color-results {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.checker__results {
    padding: 10px;
    text-align: center;
    background-color: #B42539;
    width: 100%;
    color: white;
    border-radius: 8px;
    font-style: italic;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: stretch;

    .results__title {
        font-size: 20px;
        color: #B42539;
        font-weight: bold;

    }
}

.results__container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 20px;
    background-color: #f1f1f1;
    padding: 16px;
    border-radius: 20px;
}


.results__input {
    display: none;
    padding: 8px;
}

.results__item label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 100px;
    font-size: 14px;
    color: rgb(16, 16, 16);
    font-weight: 500;
    cursor: pointer;
}

.results__input:checked+label {
    color: #ffffff;
    background-color: #000000;
    padding: 8px;
    border-radius: 8px;
}

.matrice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background-color: #f1f1f1;
    border-radius: 20px;
    width: 100%;
}

.matrice__code-container {
    background-color: #2A2A2A;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping if the content is too long */
    font-size: 16px;
    color: #ffffff;
    width: 100%;
    justify-content: center;
}

.matrice__code-container__comment {
    color: #E8D2BB;
    margin-right: 8px;
    /* Add margin to the right */
}

.matrice__code-container__property {
    color: #D1E8BB;
    margin-right: 8px;
    /* Add margin to the right */
}

.matrice__code-container__value {
    color: #BBCDE8;
    margin-right: 8px;
    /* Add margin to the right */
}

.matrice__code__buttons {
    display: flex;
    gap: 20px;
}

#code-to-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.matrice_class{
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.matrice__code__button {
    padding: 8px 16px;
    background-color: #1f1f1f;
    border-radius: 8px;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, scale 0.1s;
}

.matrice__code__button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

.matrice__code__button.btn__active {
    background-color: #ffffff;
    color: #1f1f1f;
    border: 2px solid #1f1f1f;
}

.options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.options__item {
    display: flex;
    align-items: center;
}

.options__input {
    display: none;
}

.options__label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 150px;
    font-size: 14px;
    color: rgb(16, 16, 16);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.options__input:checked+.options__label {
    color: #ffffff;
    background-color: #000000;
    border-color: #000000;
}

.options__label:focus-within {
    outline: 2px solid #005ea2;
    outline-offset: 2px;
}




.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.toggle-buttons input[type="radio"] {
    display: none;
}



.toggle-buttons label {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.toggle-buttons input[type="radio"]:checked+label {
    background-color: #B42539;
    color: white;
    border-color: #B42539;
}



.alert-adjust__modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: rgb(240, 240, 240);
    padding: 50px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-radius: 16px;
    display: none;
    opacity: 0;

}

.alert-adjust__modal.show {
    display: flex;
    opacity: 1;
    transition: 0.3s ease-in;
}

.alert-adjust__modal h2 {
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.alert-adjust__modal p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

.alert-adjust__modal button {
    padding: 10px 20px;
    background-color: #B42539;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, 0.2s;

}

.alert-adjust__modal button:hover {
    background-color: #791623;
    scale: 0.9;
}

.alert-adjust__modal button:active {
    background-color: #791623;
    scale: 1.1;
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.show {
    display: block;
    opacity: 1;
}

/* Media Queries for Mobile */
@media screen and (max-width: 700px) {
    body {
        min-width: 0;
    }

    .header {
        padding: 16px;
    }

    .header__title {
        font-size: 32px;
    }

    .main {
        gap: 10px;
        margin: 10px;
    }

    .parameters__title {
        font-size: 21px;
    }

    .checker__tools {
        justify-content: space-around;
        gap: 20px;
    }

    .parameters__container {
        gap: 10px;
        padding: 8px;
    }

    .checker__title {
        width: 100%;
    }

    .original-colors__title,
    .comparison-colors__title {
        font-size: 16px;
    }

    .comparison-colors__subtitle {
        font-size: 14px;
    }

    .original-colors__input-color,
    .comparison-colors__input-color {
        width: 136px;
    }

    .original-colors__input-text,
    .comparison-colors__input-text {
        width: 120px;
    }

    .checker:not(:last-of-type) {
        padding: 20px;
        margin-bottom: 20px;
        border-bottom: 1px solid #000000;
    }


    .results {
        display: none;
    }

    .matrice_class {
        display: none;
    }

    .color-results {
        width: 100%;
    }

}

::-webkit-color-swatch-wrapper {
    padding: 0;
}

::-webkit-color-swatch {
    border: 0;
    border-radius: 0;
}

::-moz-color-swatch,
::-moz-focus-inner {
    border: 0;
}

::-moz-focus-inner {
    padding: 0;
}

.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
}