/****************************************************************
**  $$$$$$\  $$\       $$$$$$\  $$$$$$$\   $$$$$$\  $$\        **
** $$  __$$\ $$ |     $$  __$$\ $$  __$$\ $$  __$$\ $$ |       **
** $$ /  \__|$$ |     $$ /  $$ |$$ |  $$ |$$ /  $$ |$$ |       **
** $$ |$$$$\ $$ |     $$ |  $$ |$$$$$$$\ |$$$$$$$$ |$$ |       **
** $$ |\_$$ |$$ |     $$ |  $$ |$$  __$$\ $$  __$$ |$$ |       **
** $$ |  $$ |$$ |     $$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |       **
** \$$$$$$  |$$$$$$$$\ $$$$$$  |$$$$$$$  |$$ |  $$ |$$$$$$$$\  **
**  \______/ \________|\______/ \_______/ \__|  \__|\________| **
****************************************************************/

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	color: #f0f0f0;
	background-color: #1c1c1c;
	font-family: Arial, sans-serif;
}

/* HEADER */
header {
	background-color: #252525;
	padding: 1em;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header h1 {
	font-size: 2em;
	font-weight: bold;
	color: #f0f0f0;
	margin: 0;
}

header button {
	background-color: #007bff;
	color: #fff;
	font-size: 1.2em;
	padding: 0.5em 1em;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

header button:hover {
	background-color: #0056b3;
}

header button.logout {
	background-color: #ff0000;
}

header button.logout:hover {
	background-color: #db0404;
}

/* Section */
section {
	padding: 2em;
}

section p {
	font-size: 1.2em;
	line-height: 1.5;
	color: #f0f0f0;
}

/* Footer */
footer {
	background-color: #252525;
	color: #f0f0f0;
	padding: 1em;
	text-align: center;
	margin-top: auto; /* place le footer en bas de la page */
}

footer p {
	font-size: 1.2em;
	margin: 0;
}

a {
	color: #007bff;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Affichage de la BDD */
table {
	border-collapse: collapse;
	width: 100%;
	margin: 20px 0;
	font-family: Arial, sans-serif;
	font-size: 14px;
	color: #fff;
	background-color: #292929;
	table-layout: fixed; /* Fixe la largeur des colonnes en fonction de la largeur totale de la table */
}

th:first-child,
td:first-child {
	width: 7em; /* La première colonne fera toujours 7 caractères de long */
	text-align: left;
	padding: 8px;
	border: 1px solid #444;
}

th:nth-child(4),
td:nth-child(4) {
	width: 14em; /* La quatrième colonne fera toujours 14 caractères de long */
	text-align: left;
	padding: 8px;
	border: 1px solid #444;
}

th:not(:first-child):not(:nth-child(4)),
td:not(:first-child):not(:nth-child(4)) {
	width: calc((100% - 7em - 14em) / 2); /* Les autres colonnes prennent la place restante */
	text-align: left;
	padding: 8px;
	border: 1px solid #444;
}

th {
	background-color: #444;
	color: #fff;
}

tr:nth-child(even) {
	background-color: #333;
}

tr:hover {
	background-color: #555;
}

.button {
	background-color: #007bff;
	color: white;
	padding: 3px 10px;
	border: none;
	border-radius: 5px;
	font-size: 0.8rem;
	cursor: pointer;
}

.button:hover,
.button:focus,
.button:active {
    color: #fff;
    background-color: #286090;
    border-color: #204d74;
}

.button:active,
.button.active {
    background-image: none;
    outline: 0;
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}


/* Boutons de navigation */
.pagination-buttons {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.change-prompt {
	display: inline-block;
	background-color: #333;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	margin-right: 5px;
	cursor: pointer;
}

.change-prompt:hover {
	background-color: #555;
}

/* Style de la fenêtre modale */
.modal {
	display: none;
	position: absolute;
	z-index: 1;
	left: 0;
	top: calc(50% - 100px);
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
	transform: translateY(-50%);
}

/* Style du contenu de la fenêtre modale */
.modal-content {
    background-color: #222;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 70%;
    color: white;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
} 

/* Style du titre */
.modal-content h2 {
    margin-bottom: 20px;
}

/* Style des labels et des champs de texte */
.modal label,
.modal input[type=text],
.modal select,
.modal textarea {
    display: block;
    width: 100%;
}

/* Style des champs de texte avec thème sombre */
.modal input[type=text],
.modal input[type=date],
.modal input[type=time],
.modal select,
.modal textarea {
    background-color: #444;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    color: white;
    font-size: 16px;
    padding: 8px;
    width: 100%;
}

.modal input[type=text]:hover,
.modal input[type=date]:hover,
.modal input[type=time]:hover,
.modal select:hover,
.modal textarea:hover {
    background-color: #555;
    box-shadow: 0 0 5px #fff;
}

.left-side input[type=text]:focus,
.left-side input[type=date]:focus,
.left-side input[type=time]:focus,
.left-side select:focus,
.left-side textarea:focus {
    background-color: #fff; /* Couleur de fond */
    color: #444; /* Couleur du texte */
    outline: none; /*Supprime le contour par défaut */
    transition: all 0.3s ease-in-out; /* Animation fluide */
}

/* Style du textearea */
.modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* Style des options de la liste déroulante */
.modal select option {
    background-color: #333;
    color: white;
}

/* Style du conteneur de chaque paire label-input
.modal .form-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
} */
.modal .form-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center; /* Ajout pour aligner les checkboxes */
}

/* Style du label pour qu'il soit aligné à gauche */
.modal label {
    text-align: left;
    margin-right: 10px;
	width: 30%;
}

/* Style du bouton de soumission */
.modal input[type=submit] {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
}

/* Style du bouton de fermeture de la fenêtre modale */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.left-side {
	width: 50%;
	padding: 10px;
	/* background-color: red; */
}

.left-side .buttons-container {
    display: flex;
    justify-content: center; /* Centrer horizontalement */
    width: 100%;
    /* position: absolute; */
    bottom: 0;
    left: 0;
    margin: 10px;
    gap: 10px; /* Espacement entre les boutons */
}

.left-side input[type="submit"], .left-side input[type="button"] {
	border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    padding: 10px 20px;
}

.left-side .button-cancel {
	background-color: #e74c3c;
	border-radius: 4px;
}

.left-side .button-cancel:hover {
	background-color: #c0392b;
}

.left-side .button-validate {
	background-color: #2ecc71;
}

.left-side .button-validate:hover {
	background-color: #229652;
}

.right-side {
	margin-left: 20px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	/* Centre le contenu au centre de la right side */
	align-items: center;
	width: 50%;
	position: relative;
}

.right-side .form-group {
	width: 100%;
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
}

.right-side label {
	margin-bottom: 5px;
	width: 80%;
}

.right-side select {
	outline: none;
	height: 200px;
}

#spectacles-choisis {
	height: 200px;
}

.right-side label,
.right-side select {
	display: block;
	margin: auto;
	text-align: center;
}

.offset_range label {
	font-weight: bold;
	margin-right: 10px;
}

.offset_range select {
	border: 2px solid #ccc;
	border-radius: 5px;
	padding: 5px;
	font-size: 16px;
	font-family: Arial, sans-serif;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.offset_range select:focus {
	outline: none;
	border-color: #333;
}

.offset_range select option {
	background-color: #fff;
	color: #333;
}

.offset_range select option:checked {
	background-color: #333;
	color: #fff;
}

.offset_range input[type="submit"] {
	background-color: #007bff;
	border: none;
	border-radius: 4px;
	color: white;
	padding: 10px;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 16px;
	margin-left: 10px;
	cursor: pointer;
	transition: background-color 0.3s;
  }
  
  .offset_range input[type="submit"]:hover {
	background-color: #005fc4;
  }
  
  .offset_range form {
	display: inline-block;
	text-align: center;
  }

  .offset_range {
	margin-top: 20px;
	text-align: center;
  }

  .checkbox-container {
    display: flex;
    align-items: center;
	flex-direction: row;
	width: 100%;
	  }

  .checkbox-container label {
	margin-right: 10px;
	width: 70%;
  }
