:root {
    --black: #1a1a1a;
    --white: #ffffff;
    --orange: #ffa500;
    --gray: #888888;
    --green: #4caf50;
    --light-bg: #f5f5f5;
    --lighter-bg: #ffffff;
    --dark-bg: #2c2c2c;
    --darker-bg: #232323;
    --button-bg: #f0f0f0;
    --button-text: #333;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

body.light-theme {
    background-color: var(--light-bg);
    color: var(--black);
}

body.dark-theme {
    background-color: var(--black);
    color: var(--white);
}


.banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--orange);
    color: var(--white);
     display: flex;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.banner-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    
}

.banner-logo {
    width: 60px;
    height: auto;
    border-radius: 50%;
    border: 3px solid rgb(255, 255, 255);
    margin-right: 10px;
    margin-left: 30px;
}

.banner-text {
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    /*Centrer le texte dans son espace*/
    flex-grow: 1;
    /*Prendre l'espace disponible*/
}

.theme-switch {
    background-color: transparent;
    /* Ou une couleur qui correspond à l'orange */
    color: var(--white);
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    /* Effet de survol doux */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-right: 2rem;

}

.theme-switch:hover {
    background-color: rgba(255, 255, 255, 0.2);
    /* Un léger éclaircissement au survol */
}

.theme-icon {
    width: 1.5rem;
    /* Ajuster la taille de l'icône */
    height: 1.5rem;
    pointer-events: none;
    /* S'assurer que les clics sont enregistrés sur le bouton, pas sur l'icône */
}

.BasDePage {
    display: flex;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    background-color: var(--orange);
}

/* Ajustements pour l'adaptabilité */
@media (max-width: 768px) {
    .banner {
        padding: 8px 12px;
        /* Réduire l'espacement sur les petits écrans */
    }

    .banner-logo {
        width: 30px;
        /* Logo plus petit sur mobile */
    }

    .banner-text {
        font-size: 1rem;
        /* Texte plus petit sur mobile */
    }
    #savingsChart {
        width: 100% !important;
        height: 300px !important;
        display: block;
    }
    
}



.container {
    padding: 5rem 1rem 1rem 1rem;
    max-width: 1024px;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.light-theme .container {
    background-color: var(--lighter-bg);
}

.dark-theme .container {
    background-color: var(--dark-bg);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    transition: color 0.3s;
}

.light-theme h1 {
    color: var(--orange);
}

.dark-theme h1 {
    color: var(--orange);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    transition: color 0.3s;
}

.light-theme label {
    color: var(--black);
}

.dark-theme label {
    color: var(--white);
}

input[type="range"] {
    width: 100%;
    margin-top: 10px;
    -webkit-appearance: none;
    background: var(--gray);
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

input[type="range"]:hover {
    opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: var(--orange);
    cursor: pointer;
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: var(--orange);
    cursor: pointer;
    border-radius: 50%;
}

.range-value {
    text-align: center;
    font-weight: bold;
    color: var(--green);
}

#result {
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    transition: background-color 0.3s;
}

.light-theme #result {
    background-color: var(--light-bg);
}

.dark-theme #result {
    background-color: var(--darker-bg);
}

#result h2 {
    color: var(--orange);
    margin-top: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.result-item span:last-child {
    font-weight: bold;
    color: var(--green);
}

.chart-container {
    margin-top: 30px;
    border-radius: 8px;
    padding: 2%;
    transition: background-color 0.3s;
}

.light-theme .chart-container {
    background-color: var(--light-bg);
}

.dark-theme .chart-container {
    background-color: var(--darker-bg);
}

.fees-group {
    display: flex;
    justify-content: space-between;
}

.fees-input {
    width: 48%;
}

#themeToggle {
    cursor: pointer;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#themeToggle:hover {
    background-color: #e69500;
}

.theme-icon {
    width: 1.5rem;
    /* Ajuster la taille de l'icône */
    height: 1.5rem;
    pointer-events: none;
    /* S'assurer que les clics sont enregistrés sur le bouton, pas sur l'icône */
}

.light-theme .sun-icon {
    display: none;
}

.dark-theme .sun-icon {
    display: block;
}

.light-theme .moon-icon {
    display: block;
}

.dark-theme .moon-icon {
    display: none;
}

.download-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: auto;
}

.download-button svg {
    transition: filter 0.3s ease;
}

.download-button:hover svg {
    filter: brightness(70%);
}