html {
    font-size: 15px;
}

h1 {
    text-align: center;
}

.uploadWrapper {
  margin: 1rem 0;
}

#imageInput {
  display: none;
}

#topSection {
    display: flex;
}

#topSection section {
    padding: 1.5em;
}

#topSection section * {
    width: fit-content;
}

#topSection h2, #sectionPalette h2 {
  font-size: 22px;
  margin-bottom: 1rem;
  color: var(--darker-primary-color);
  font-weight: 600;
  line-height: 1.3;
  padding-top: 0;
  margin:0;
}



.uploadButton, #generate {
  display: block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1rem;
  width: fit-content;
}

.uploadButton:hover, #generate:hover {
  background-color: var(--darker-primary-color);
}

.uploadButton:active, #generate:active {
  background-color: var(--accentuation-color);
}









#colorCountSlider {
    width: 95%;
    max-width: 400px;
    margin: auto;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: lightgrey;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 5px 0;
    box-sizing: border-box;
    flex-basis: auto;
    margin-bottom: 1.5em;
    margin-top: 1em;
}

#colorCountSlider:hover {
    opacity: 1;
}

/* ===== WebKit ===== */
#colorCountSlider::-webkit-slider-runnable-track {
    height: 5px;
    background: lightgrey;
    border-radius: 4px;
}

#colorCountSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 30px;
    background: var(--darker-main-color);
    cursor: pointer;
    margin-top: -12.5px; /* Pour aligner verticalement le thumb avec le track */
    border-radius: 4px;
}

/* ===== Firefox ===== */
#colorCountSlider::-moz-range-track {
    background: lightgrey;
    height: 5px;
    border-radius: 4px;
}

#colorCountSlider::-moz-range-progress {
    background: var(--primary-color);
    height: 5px;
    padding: 4px;
}

#colorCountSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--lighter-primary-color);
    cursor: pointer;
    border-radius: 15px;
    border-width: 4px;
}

/* ===== IE/Edge Legacy ===== */
#colorCountSlider::-ms-track {
    background: transparent;
    border-color: transparent;
    color: transparent;
    height: 5px;
}

#colorCountSlider::-ms-fill-lower {
    background: var(--dark);
    border-radius: 4px;
}

#colorCountSlider::-ms-fill-upper {
    background: lightgrey;
    border-radius: 4px;
}

#colorCountSlider::-ms-thumb {
    width: 25px;
    height: 30px;
    background: var(--darker-primary-color);
    cursor: pointer;
    border-radius: 4px;
}

#sectionPreview {
    margin-bottom: 2rem; 
    flex-grow: 1; 
    max-width: 450px; 
    margin: auto;
}

#sectionPalette {
    margin-top: 1em;
}

#sectionPalette h2 {
    text-align: center;
}

#palette {
    text-align: center;
    justify-content: center;
}







.color {
    flex-grow: 1;
    transition: 0.5s cubic-bezier(.77,0,.18,1);
    background-color: #fff;
    border: 1.5px solid black;
    min-width: 10em;
    max-width: 10em;
}

.color:hover {
    flex-grow: 2;
    transition: 0.5s cubic-bezier(.77,0,.18,1);
    max-width: 20em;
}


.colorPreview{
    min-height: 5em;
    height: 150px;
}



.colorPreview {
    position: relative;
    cursor: pointer;
    min-height: 5em;
    height: 100px;
}

.copyLabel {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.colorPreview:hover .copyLabel {
    opacity: 1;
}


.color-code {
    width: 4.5em;
    display: inline-flex;
}

.icon-lock-color {
    width: auto;
    padding: 0 0 0 calc(100% - 6em)
}



#article {
    margin-top: 2rem; 
    margin-bottom: 2rem;
    padding-left: 0;
    padding-right: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#article h2 {
    font-size: 1.85rem; 
    margin-bottom: 1.5rem;
    color: var(--darker-primary-color);
    font-weight: bold;
    line-height: 1.2;
    padding-top: 0;
}

#article h3 {
    font-size: 22px;
    margin-bottom: 1rem;
    color: var(--darker-primary-color);
    font-weight: 600;
    line-height: 1.3;
    padding-top: 0;
}


#article p {
    font-size: 1rem;
    line-height: 1.7; 
    margin-bottom: 1.5rem;
    color: var(--dark);
}

#article ul {
    margin-left: 2rem; 
    margin-bottom: 1.5rem;
    list-style-type: disc; 
}

#article ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

#article a {
    color: var(--primary-color); 
    text-decoration: none;
    font-weight: 500; 
}

#article a:hover {
    text-decoration: underline; 
    color: var(--accentuation-color); 
}

#article strong {
    color: #222;
    font-weight: 600;
}


@media (max-width: 725px){
    #topSection {
          flex-wrap: wrap;
    }
    
    #topSection section{
          margin: auto;
          width: 95%;
          padding: 1em;
          max-width: 100% !important;
    }
    
    #topSection label {
        text-align: center;
    }
    
    #colorCountSlider {
        width: inherit !important;
    }
}
