/* [Object] Modal */

.modal {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: left;
    background: rgba(0,0,0, .9);
    transition: opacity 1s ease;
}

.modal__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    cursor: pointer;
}

.modal-state {
    display: none;
}

.modal-state:checked + .modal {
    opacity: 1;
    visibility: visible;
}

.modal-state:checked + .modal .modal__inner {
    top: 0;
}

.modal__inner {
	transition: top .50s ease;
	position: absolute;
	top: -20%;
	right: 0;
	bottom: 0;
	left: 0;
	width: 50%;
	margin: auto;
	overflow: auto;
	background: #fff;
	border-radius: 5px;
	padding: 1em 2em;
	max-height: 60%; /* Augmenter la hauteur maximale */
	box-sizing: border-box; /* S'assurer que le padding est inclus dans la hauteur */
}

.modal__inner p {
    font-size: 15px;
    color: #000000;
    text-align: left;
}

.modal__close {
    position: absolute;
    right: 1em;
    top: 1em;
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
}

.modal__close:after,
.modal__close:before {
    content: '';
    position: absolute;
    width: 2px;
    height: 1.5em;
    background: #616161;
    display: block;
    transform: rotate(45deg);
    left: 50%;
    margin: -3px 0 0 -1px;
    top: 0;
}

.modal__close:hover:after,
.modal__close:hover:before {
    background: #aaa;
}

.modal__close:before {
    transform: rotate(-45deg);
}


/* Other */

.btn {
    cursor: pointer;
	color: #333;
	transition: color 0.4s ease!important; /* Temporisation de changement de couleur */
    text-decoration: underline;
}

.btn:hover,
.btn:focus {
    color: #FF8727!important;
}


/* Responsive */

@media only screen and (max-width: 650px) {
	
    .modal__inner {
		width: 90%;
		max-height: 68%; /* Augmenter la hauteur maximale pour les petits écrans */
		height: auto; /* Ajuster la hauteur automatiquement */
        top: calc(50% + 50px); /* Décaler le modal vers le bas */
        transform: translateY(+20%); /* Recentrer verticalement le modal */
		box-sizing: border-box;
		overflow-y: auto;
    }
    
}
