/* Variables nécessaires extraites de votre global.css */
:root {
    /* Light Theme (Default) */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #f97316;
    --success: #4CAF50;
    --success-hover: #45a049;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --background: #f0f0f0;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #cccccc;
    --toggle-bg: #cccccc;
    --toggle-active: #3e5c98;
    --section-bg: #f9f9f9;
    --section-hover: #f0f0f0;
    --section-border: #3e5c98;
    --button-hover: #2b3e6f;
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 2px 5px rgba(0, 0, 0, 0.15);
    /* Couleur pour le texte (+1) */
    --plus-one-color: #3e5c98;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #fb923c;
    --success: #22c55e;
    --success-hover: #16a34a;
    --background: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
    --toggle-bg: #475569;
    --toggle-active: #6366f1;
    --section-bg: #1e293b;
    --section-hover: #334155;
    --section-border: #6366f1;
    --button-hover: #4f46e5;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 2px 5px rgba(0, 0, 0, 0.4);
    /* Couleur pour le texte (+1) en mode sombre */
    --plus-one-color: #6366f1;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.25rem;
}

/* Reset minimal pour le bouton */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Bouton retour au menu - copie exacte de votre global.css */
.back-to-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--success);
    color: white;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: 'Poppins', sans-serif;
}

.back-to-menu:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
}

/* Adaptation mobile */
@media (max-width: 480px) {
    .back-to-menu {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

#importXMLInput {
    display: none;
}

@font-face {
    font-family: 'BrownFtv';
    src: url('fonts/BrownFtv-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    background-color: var(--background);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

.container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.canvas-section {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

canvas {
    border: 0px;
    width: 100%;
    height: auto;
    max-width: 1920px;
}

.config-section {
    flex: 1;
    padding: 1%;
    background-color: var(--card-bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
}

#fileName {
    margin-bottom: 5px;
}

h2 {
    font-size: 2vh;
    margin-bottom: 1vh;
    color: var(--text);
}

label {
    display: block;
    margin: 0.3vh 0 0.2vh;
    font-size: 1.4vh;
    color: var(--text);
}

input, select {
    width: 100%;
    padding: 0.4vh;
    margin-bottom: 0.5vh;
    font-size: 1.4vh;
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Style amélioré pour le toggle switch */
.toggle-switch-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 5px;
    background-color: var(--section-bg);
    border-radius: 8px;
    border-left: 4px solid var(--section-border);
    box-shadow: var(--shadow-small);
    transition: var(--transition);
}

.toggle-switch-container:hover {
    background-color: var(--section-hover);
    box-shadow: var(--shadow-hover);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .toggle-slider {
    background-color: var(--toggle-active);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--toggle-active);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 1.4vh;
    font-weight: 500;
    color: var(--text);
}

.toggle-description {
    font-size: 1.2vh;
    color: var(--text-light);
    margin-top: 3px;
}

.inline-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8vh;
}

.inline-container label {
    margin-bottom: 0;
    white-space: nowrap;
    flex: 1;
}

.inline-container select,
.inline-container input[type="color"] {
    flex: 2;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1vh 0;
    width: 100%;
}

button {
    padding: 1vh;
    background-color: var(--success);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.6vh;
    width: 100%;
    margin-bottom: 1vh;
}

button:hover {
    background-color: var(--button-hover);
}

.color-picker-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5vh;
}

.team-entry {
    display: flex;
    align-items: center;
    margin-bottom: 0.5vh;
}

.team-entry select {
    flex: 3;
    margin-right: 5px;
}

.team-entry input[type="number"] {
    flex: 1;
    margin-left: 5px;
    margin-right: 5px;
}

.plus-one-checkbox-container {
    display: flex;
    align-items: center;
    margin-left: 5px;
}

.plus-one-checkbox-container input[type="checkbox"] {
    width: auto;
    margin-right: 3px;
}

.plus-one-checkbox-container label {
    margin: 0;
    font-size: 0.8em;
    white-space: nowrap;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8vh;
}

.range-container input {
    flex: 1;
}

@media (max-width: 768px) {
    .canvas-section {
        flex: 1;
    }

    .config-section {
        flex: 1;
        padding: 5px;
    }

    h2, label, input, select, .toggle-label, button {
        font-size: 3vw;
    }
    
    .toggle-description {
        font-size: 2.5vw;
    }

    .toggle-switch {
        width: 40px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
}