body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
    font-size: 1em; 
    color: #35334D;
}

.container {
    max-width: 800%;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; 
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

p {
    text-align: left;
    margin-bottom: 20px;
}

.table-container {
    border-radius: 8px; 
    border: 1px solid #dee2e6;
    overflow: hidden; 
    margin-bottom: 20px;
}

.table-scroll {
    overflow-x: auto; 
}

table {
    width: 100%;
    border-collapse: collapse;
    outline: 1px solid #dee2e6;
    margin: 0; 
}

th, td {
    padding: 12px;
    text-align: left;
    word-wrap: break-word; 
}

th {
    background-color: #35334D;
    color: #ffffff;
}

.input-cell {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
    background-color: #C1D6E2;
    border: 1px solid #ced4da;
    border-radius: 8px;
}

h3 {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #495057;
}

/* Switch styles */
.switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #35334D;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: white;
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: #35334D;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.container.dark-mode {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.table-container.dark-mode,
.bubble.dark-mode {
    background-color: #333;
    color: #e0e0e0;
}

#total_cost_euros_ht.dark-mode {
    background-color: #333;
    color: #e0e0e0;
    border-radius: 20px;
}

#total_cost_euros_ttc.dark-mode {
    background-color: #284833;
    color: #E5EEE1;
    border-radius: 20px;
}

.checkbox-container.dark-mode .checkmark {
    background-color: #555;
    border-color: #777;
    color: #fff;
}

.checkbox-container.dark-mode input:checked ~ .checkmark {
    background-color: #35334D;
    border-color: #284833;
}

.checkbox-container.dark-mode {
    color: #e0e0e0;
}

.checkbox-container.dark-mode:hover {
    background-color: #444;
}

.info-icon.dark-mode {
    background-color: #555;
    color: #e0e0e0;
    border-color: #777;
}

.info-icon.dark-mode:hover::after {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    color: #495057;
    transition: background-color 0.3s ease;
    justify-content: center;
    border-radius: 8px;
}

.checkbox-container:hover {
    background-color: #F8F7F9;
    border-radius: 8px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 15px;
    width: 15px;
    background-color: #F8F7F9;
    border: 1px solid #D0CFDC;
    border-radius: 8px;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #0E547C;
    border-color: #0E547C;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 3.5px;
    top: 1px;
    width: 6px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Styles des icônes d'information */
.info-icon {
    display: inline-block;
    margin-left: 10px;
    background-color: #fff;
    border: 1px solid #D0CFDC;
    color: #35334D;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    text-align: center;
    line-height: 12px;
    font-size: 10px;
    cursor: pointer;
    position: relative;
}

.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    font-size: 15px;
    line-height: 120%;
    bottom: 170%;
    transform: translateX(-70%);
    background-color: #fff;
    border: 1px solid #D0CFDC;
    color: #35334D;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 0.85;
    transition: opacity 0.3s;
    width: 200px;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
}

.info-icon::after {
    content: "";
    opacity: 0;
    transition: opacity 0.3s;
}

.bubble {
    display: inline-block;
    padding: 5px 10px;
    background-color: #F8F7F9;
    color: #35334D;
    border-radius: 10px;
    font-size: 0.8em;
    margin-left: auto;
    margin-right: 0; 
}

#total_cost_euros_ht {
    display: block;
    font-size: 1.2em;
    font-weight: normal;
    color: #35334D;
    text-align: right;
    margin-top: 10px;
    padding: 10px;
    background-color: #F8F7F9;
    border-radius: 20px;
}

#total_cost_euros_ttc {
    font-size: 1.5em;
    font-weight: bold;
    color: #0B410B;
    text-align: right;
    margin-top: 10px;
    padding: 10px;
    padding-right: 50px;
    background-color: #E5EEE1;
    border-radius: 20px;
}

/* Media Queries for Responsive Design */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
    }

    th, td {
        padding: 16px;
    }

    .input-cell {
        width: 80%;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }

    th, td {
        padding: 20px;
    }

    .input-cell {
        width: 80%;
    }
}

/* Styles for dark mode toggle */
.dark-mode-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
}

.dark-mode-toggle p {
    margin: 0;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

body.dark-mode .dark-mode-toggle p {
    color: #e0e0e0;
}
