/* Styles CSS pour améliorer l'apparence */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.pdf-iframe:hover {
    width: 500px; /* Largeur agrandie au survol */
    height: auto; /* Ajuste automatiquement la hauteur en fonction de la largeur */
    z-index: 10;  /* Met en avant si nécessaire */
    position: relative; /* Assure que l'iframe ne chevauche pas les autres éléments */
}
.iframe-container {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute; /* Ou autre position adaptée */
    z-index: 10;
}

.iframe-container.visible {
    visibility: visible;
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    background-color: #626ba5;
    color: white;
    height: 100vh;
    padding-top: 20px;
    padding-left: 20px;
    font-weight:bold;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}
#iframe-preview {
    position: fixed; /* Fixe l'élément par rapport à la fenêtre du navigateur */
    right: 20px;     /* Positionne la div à 20px du bord droit */
    top: 50%;        /* Centre verticalement la div */
    transform: translateY(-50%); /* Ajuste pour que la div soit centrée par rapport à son milieu */
    border: 1px solid #ccc;
    background: white;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 5px;
    border-radius: 5px;
}.sidebar a {
    display: block;
    color: white;
    padding: 10px;
    text-decoration: none;
}

.sidebar a:hover {
    background-color: #32587e;
}

.sidebar a.active {
    background-color: #4a90e2 !important;
    border-left: 4px solid #ffffff;
    padding-left: 16px;
    font-weight: bold;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}
.partie_droite{
    margin-left: 300px;
    padding: 20px;
    width: calc(100vw - 320px);
    overflow-x: auto;
}
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: #626ba5;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}


#dropzone {
    width: 500px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    text-align: center;
    line-height: 200px;
    color: #aaa;
    margin: 20px auto;
}
#dropzone.dragover {
    border-color: #333;
    color: #333;
}
form {
    width: 700px;
    margin: 20px auto;
}
label {
    display: block;
    margin-bottom: 5px;
}
select, input[type="text"], input[type="date"], input[type="number"], input[type="file"] {
    width: calc(100% - 20px);
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Style moderne pour les selects */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

select:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
button {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
    margin: 0 5px;
}
button:hover {
    background-color: #5a6268;
}
#logout-button {
    background-color: #dc3545;
}
#logout-button:hover {
    background-color: #c82333;
}
#confirm-upload-button {
    display: none; /* Cacher par défaut */
    background-color: #28a745;
}
#confirm-upload-button:hover {
    background-color: #218838;
}
.supplier-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.add-supplier-button {
    padding: 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    position: relative;
}
.add-supplier-button:hover {
    background-color: #218838;
}
.tooltip {
    display: block;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
}
.add-supplier-button:hover + .tooltip {
    visibility: visible;
}
.file-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
    margin: 15px 0;
    min-width: 600px;
    max-width: 800px;
}

.file-container:hover {
    border-color: #4a90e2;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

/* Style moderne pour l'input file */
.file-container input[type="file"] {
    flex: 1;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    min-height: 50px;
    line-height: 1.5;
    min-width: 400px;
    max-width: 600px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-container input[type="file"]:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.file-container input[type="file"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Style moderne pour le bouton de confirmation */
#confirm-upload-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

#confirm-upload-button:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

#confirm-upload-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Style pour la checkbox etat */
#etat {
    transform: scale(1.5);
    margin-right: 10px;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }
}