/* utilisé par les modales bootstrap (popin) */
@media (min-width: 768px) {
    .modal-huge-dialog{
        width:100%;
        max-width:100%
    }
    .modal-large-dialog{
        width:80%;
        max-width:100%
    }
    .modal-medium-dialog{
        width:60%;
        max-width:100%
    }
    .modal-narrow-dialog {
        width:40%;
        max-width:100%
    }
}
@media(max-width: 767px) {
    .modal-narrow-dialog {
        max-width:80%
    }
}

/* pour que les modales intègrent elles-même leur scroll (afin de ne pas coincer les utilisateurs de touchpad) */
.modal-open .modal {
    height: 100%;
}
.modal-dialog {
    height: 90%;
}
.modal-tall-dialog {
    height: 95%;
}
.modal-content {
    max-height: 100%;
}

.modal-body {
    overflow-y: scroll;
    overflow-x: auto;
}


/* semble utilisé dans module/settings */
.drag-handle {
    margin-right: 10px;
    font: bold 20px Sans-Serif;
    color: #5F9EDF;
    display: inline-block;
    cursor: move;
    cursor: -webkit-grabbing;
}

/* TODO faire du ménage: smart-popin et open-popin sont-ils toujours d'actualité ? */
.smart-popin {
    position: fixed;
    left: 0; right: 0;
    top: 0; bottom: 0;
    overflow: auto; /* scrollbar will appear if the viewport is too tight to display all the popin content */
    opacity: 0;
    visibility: hidden;

    /* design */

    background-color: rgba(0,0,0,0.5);
    -webkit-transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
    -ms-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    transition: all 0.4s ease;
}
.smart-popin:target {
    opacity: 1;
    visibility: visible;
}
.smart-popin .sp-table {
    display: table;
    height: 100%;
    width: 100%;
}
.smart-popin .sp-cell {
    display: table-cell;
    vertical-align: middle;
    padding: 10px; /* this space is important to let the box-shadow exceed around the popin - so it has to be at least equal to the shadow radius */
}
.smart-popin .sp-body {
    position: relative; /* to allow absolute positionning inside */
    z-index: 1; /* to ensure the popin body will be over the .sp-back layer */
    width: auto; /* by default the width of the wider element inside */
    min-width: 300px;  /* standard width for xs smartphones (320px) minus 2*10px (.sp-cell margins) */
    margin: 0 auto;

    /* design */

    background-color: #ffffff;
    padding: 2em;
    -webkit-box-shadow: 0 3px 5px 1px rgba(0,0,0,0.25);
    box-shadow: 0 3px 5px 1px rgba(0,0,0,0.25);
    width: 66.66%; /* 66.66 looks good :-) */;
}
.smart-popin .sp-body * {
    max-width: 100%; /* this is a security to prevents wide elements such as img to stretch the popin beyond the viewport width */
}
.smart-popin .sp-back { /* only used to get clicks out of the popin body */
    position: fixed;
    left: 0; right: 0;
    top: 0; bottom: 0;
    display: block;
}
.smart-popin .sp-close {
    position: absolute;
    top: 0;
    right: 0;

    width: 36px;
    height: 36px;

    text-align: center;
    line-height: 36px;
    font-size: 1.6em;
    color: #000000;
    font-weight: 900;
    text-decoration: none;
}



/* misc */

.website-content {
    max-width: 980px;
    padding: 20px;
    margin: 0 auto;
}
.open-popin {
    display: inline-block;
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    background-color: #5c4ac7;
    padding: 0.5em 1.5em;
    border-radius: 20px;
    margin-bottom: 0.8em;
    border-color: inherit !important;
}

.open-popin2 {
    display: inline-block;
    text-align: center;
    color: white;
    background-color: crimson;
    padding: 0.5em 1.5em;
    border-radius: 20px;
    margin-bottom: 0.8em;
    border-color: inherit !important;
    text-decoration:none !important;
}

.open-popin:hover{
    color: #5c4ac7;
}

.open-popin2:hover{
    color: crimson;
    border-color: crimson !important;
    background-color: white;
}