body {
    font-family:Tahoma, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color:#0000FF;
    /* background-color: #000000; */
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin: 40px 0;
}

.container {
    display: flex;
    justify-content: center;
    width: 100%;
}

#left-column, #right-column {
    background-color: rgba(94, 31, 240, 0.154);
    padding: 40px;
    width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 700px;
}

.left-col, .column {
    padding: .75rem;
    width: 180px !important;
}

.file-label {
    font-size: 20px;
}

.column, .is-one-quarter {
    position: -webkit-sticky;
    position: sticky;
    top: 10px; /* Distance du haut de la page */
    height: calc(100vh - 20px); /* Hauteur maximale de la fenêtre moins la marge */
    overflow-y: auto; /* Permet le défilement si le contenu est trop long */
    z-index: 100; /* S'assure que les outils restent au-dessus du contenu */
}

.column.is-one-quarter .box {
    background-color: rgba(255, 255, 255, 0.95); /* Fond légèrement transparent */
    height: 100%;
    overflow-y: auto;
}

#left-column {
    left: 0;
}

#right-column {
    right: 0;
}

#left-column div, #right-column div {
    margin-bottom: 40px;
}

#center-column {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

canvas {
    border: 1px solid #dbdbdb;
    background-color: #FFFFFF;
    cursor: crosshair;
    display: block;
    margin: 10px 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#site-logo {
    width: 500px;
    height: auto;
}

#pdf-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Buttons navigation */

button {
/* button, input[type=file]::file-selector-button { */
    padding: 10px;
    /* background-color: #FFA500;
    border: 1px solid #FFA500; */
    background-color: #dbdbdb;
    border: 1px solid #dbdbdb;
    color: #FFFFFF;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    width: 200px;
}

.btn-with-image {
    width: 100px;
    height: 100px;
}

input[type=number] {
    padding: 10px;
    width: 60px;
    font-size: 16px;
    /* background-color: #FFA500;
    border: 1px solid #FFA500; */
    background-color: #dbdbdb;
    border: 1px solid #ec1414;
    /* color: #FFFFFF; */
    color: black;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

#right-column label {
    display: block;
    margin-bottom: 10px;
}

label {
    color: #FFFFFF;
}

button:hover, input[type=file]::file-selector-button:hover {
    background-color: #4e16f6;
    color: #dbdbdb;
    /* color: #FFA500; */
}

#right-column input[type=file]::file-selector-button {
    width: 100%;
}

#btn-clear {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

button.active {
    background-color: rgb(21, 234, 142);
    /* color: #FFA500; */
    color: #5916ea;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#container1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    min-height: 500px;
    overflow: auto;
    padding: 0.5rem;
    transition: transform 0.2s ease-out;
    transform-origin: top left;
    overflow: auto !important;
    max-width: 100%;
    max-height: calc(100vh - 2rem);
    margin: 0;
    padding: 0.5rem;
    position: relative;
}

#container1::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

#container1::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

#container1::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

#container1::-webkit-scrollbar-thumb:hover {
    background: #555;
}

#container1 canvas {
    margin: 0 auto;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#btn-clear:hover {
    background-color: rgb(30, 222, 136);
    color: white;
}

.compas {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    gap: 10px;
    margin-bottom: 20px !important;
}

/* Styles pour le sélecteur de fichier */
.file-cta {
  background-color: #4a4a4a;
  color: white;
  padding: 0.5em 1em;
  cursor: pointer;
}

.file-name {
  background-color: white;
  border: 1px solid #dbdbdb;
  padding: 0.5em 1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Styles pour les sélecteurs de couleurs */
.tool-group {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.tool-group h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.color-picker {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker label {
    min-width: 80px;
    font-size: 0.9rem;
    color: #4a4a4a;
}

.color-picker input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 25px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

/* Modal */

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1470px;
    height: 250px;
    background: white;
    border: none;
}

.close {
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
    font-size: 20px;
    color: #dbdbdb;
    font-weight: bold;
    z-index: 1001;
    border-bottom: 1px solid #dbdbdb;
    padding: 5px 10px;
}

.close:hover {
    color: #333;
}

/* Styles pour la loupe sur le canvas */
/* #center-column {
    position: relative;
} */

.magnifier {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #000;
    cursor: zoom-in;
    /* width: 150px;
    height: 150px; */
    width: 300px;
    height: 300px;
    overflow: hidden;
    display: none;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.magnifier canvas {
    position: absolute;
    /* top: -100px;
    left: -100px; */
    width: 450px;
    height: 450px;
}

.column {
    height: calc(100vh - 140px);
    overflow-y: auto;
    position: sticky;
    top: 10px;
}

.left-col {
    width: 180px !important;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
}

.popup h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.number-controls, .measure-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.number-buttons, .measure-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.number-buttons button, .measure-buttons button {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f8f8;
    cursor: pointer;
}

.number-buttons button:hover, .measure-buttons button:hover {
    background-color: #eee;
}

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

#number-value, #measure-value {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#apply-number, #apply-measure {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#apply-number:hover, #apply-measure:hover {
    background-color: #45a049;
}

/* Styles pour le zoom */
.buttons.has-addons .button {
    margin: 0;
    padding: 0.3rem;
}

.buttons.has-addons .button:not(:last-child) {
    margin-right: -1px;
    border-right: none;
}
.buttons.has-addons .button:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.buttons.has-addons .button:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.container-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
