@import url('./vars.css');
@import url('./nav.css');
@import url('./fonts.css');
@import url('./generics.css');
@import url('./table.css');
@import url('./modal.css');

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Roboto', sans-serif, Arial, Helvetica, sans-serif;
    background: var(--bg-color1);
    background: linear-gradient(90deg, var(--bg-color1) 0%, var(--bg-color2) 100%);
    padding: 0;
    margin: 0;
}


.container {
    margin-left: auto; 
    margin-right: auto;
    width: 100%;
    max-width: 1200px;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 9px 0px 0px white, 0 -9px 0px 0px white, 12px 0 15px -4px rgba(124, 124, 124, 0.8), -12px 0 15px -4px rgba(117, 117, 117, 0.8);
}

.container h1 {
    font-size: 1.9rem;
    text-align: center;
    margin: 2rem 0 1rem 0;
}

.container h2 {
    font-size: 1.5em;
    text-align: center;
    margin: 0;
    color: white;
    background-color: var(--color-dark-brown);
    padding-top: 10px;
}

.container .inner {
    width: 100%;
    border: 1px solid #CCC;
    padding: 10px;
}

img.logo {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.construction {
    font-family: 'Dancing Script',
        cursive;
    font-size: 50px;
    margin-top: 20px;
}

.pave {
    background-color: #e2dbd0;
    border-radius: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.pave header {
    background-color: var(--color-dark-brown);
    border-radius: 20px 20px 0 0;
    padding: 10px;
    text-align: center;
    color: white;
    font-size: 20px;
}

.pave .contenu {
    padding: 20px;
}

.reseau {
    margin-top: 50px;
    padding: 10px;
    margin-bottom: 50px;
}

.reseau img {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

input.form {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #CCC;
    margin-bottom: 10px;
}

input.form:invalid {
    border: 1px solid red;
}

input.form_design,
select.form_design,
textarea.form_design {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid #CCC;
    border-bottom: 1px solid #45433f;
    background-color: #e2dbd0;
    line-height: 2em;
}

input.wa,
select.wa,
textarea.wa {
    width: auto!important;
    min-width: 0!important;
}

select.form_design {
    width: auto;
}

select.form_design option:disabled {
    font-weight: bold;
    color: black;
}

button {
    border: 0px;
    background-color: var(--color-dark-brown);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: 0.3s all;
}

button.carre {
    border-radius: 0px;
}

button.onglet {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

button:hover {
    background-color: #8c857a;
}


button.wa {
    width: auto!important;
    min-width: 0!important;
}

button.disabled {
    background-color: #CCC;
    color: #45433f;
    cursor: default;
}

button.red {
    background-color: #f44336;
    color: white;
}

button.red:hover {
    background-color: #d32f2f;
    color: white;
}

button:disabled,
button.red:disabled {
    background-color: #CCC;
    color: #45433f;
    cursor: default;
}

button.picto_only {
    min-width: 0px;
}

button.floating {
    min-width: 0px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    padding: 0;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a.btn {
    border: 0px;
    background-color: #a39b90;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: 0.3s all;
    text-decoration: none;
}

a.btn:hover {
    background-color: #8c857a;
    text-decoration: none;
}

.alert.alert-danger {
    background-color: #f44336;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.alert.alert-success {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}

div.section {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #CCC;
    background-color: #EEE;
}

div.section header {
    position: relative;
    bottom: 15px;
    font-size: 0.8em;
}

div.cat_titre {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
    margin-top: 20px;
}

div.liste_prestations {
    background-color: #EEE;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #CCC;
}

div.liste_prestations .prestations {
    display: grid;
    grid-template-columns: 1fr 100px 100px 100px;
    padding-bottom: 10px;
    border-bottom: 1px solid #CCC;
    margin-bottom: 10px;
    transition: 0.3s all;
    padding: 5px;
    cursor: pointer;
}

div.liste_prestations.admin .prestations {
    grid-template-columns: 50px 1fr 100px 100px;
}

div.liste_prestations.admin .prestations.disabled {
    color: #818181;
}

div.liste_prestations .prestations:last-child {
    border-bottom: 1px solid transparent;
}

div.liste_prestations .prestations:hover {
    background-color: #DDD;
}

div.liste_prestations.admin .prestations .ordre_up:hover,
div.liste_prestations.admin .prestations .ordre_down:hover {
    color: var(--color-red);
}

div.liste_prestations.admin .prestations:first-child .ordre_up {
    visibility: hidden;
}

div.liste_prestations.admin .prestations:last-child .ordre_down {
    visibility: hidden;
}

div.liste_prestations .prestations .libelle {
    font-size: 1.1em;
    font-weight: 500;
}

div.liste_prestations .prestations .desc {
    font-size: 0.8em;
}

div.liste_prestations .prestations .duree {
    font-size: 1.1em;
    text-align: right;
}

div.liste_prestations .prestations .tarif {
    font-weight: bold;
    font-size: 1.1em;
    text-align: right;
}

.label {
    font-size: 0.8em;
    color: #45433f;
}

.recap_ligne_presta {
    display: grid;
    margin-bottom: 5px;
    padding: 10px;
    grid-template-columns: 1fr 130px 100px 100px;
}

.recap_ligne_presta:hover {
    background-color: #DDD;
}

.recap_ligne_presta .duree {
    white-space: nowrap;
    padding: 0 20px;
    text-align: right;
}

.recap_ligne_presta .montant {
    font-weight: bold;
    text-align: right;
}

.recap_ligne_presta div.quantite {
    user-select: none;
}

.recap_ligne_presta span.quantite {
    text-align: right;
    display: inline-block;
    width: 30px;
}

.recap_ligne_presta.total {
    background-color: #45433f;
    color: white;
    font-weight: bold;
}

.jours_proposes {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 20px;
}

.jour_propose {
    border: 1px solid #CCC;
    padding: 20px;
}

.jour_propose .header {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.jour_propose .heures_proposees {
    text-align: center;
}

.jour_propose .heure_proposee {
    display: block;
    border: 1px solid #CCC;
    padding: 5px;
    margin: 5px;
    cursor: pointer;
    transition: 0.3s all;
}

.jour_propose .heure_proposee:hover {
    background-color: #DDD;
}

.jour_propose .heure_proposee.selected {
    background-color: #a39b90;
    color: white;
}

.message {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #CCC;
    background-color: #EEE;
}

.message .message-header {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.message.erreur {
    background-color: #93180f;
    color: white;
    border: 1px solid #93180f;
}

.message.erreur .message-header {
    color: white;
}

.liste_rdv {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.rdv_box {
    width: 100%;
    margin-right: 10px;
    border: 1px solid #CCC;
    border-radius: 10px 10px 0 0;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    margin-bottom: 20px;
    position: relative;
    display: grid;
    grid-template-rows: 40px 1fr;
}

.rdv_box header {
    background-color: #45433f;
    color: white;
    padding: 10px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

.rdv_box .contenu {
    display: grid;
    grid-template-rows: 40px 1fr 60px;
    height: 100%;
}

.rdv_box .heures {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 10px;
    background-color: #dad9d9;
}

.rdv_box .heure {
    font-size: 0.9em;
    font-weight: bold;
}

.rdv_box .prestations {
    padding: 10px;
}

.rdv_box .prestations .prestation {
    display: grid;
    grid-template-columns: 1fr 100px 100px;
    padding: 10px;
    transition: 0.3s all;
}

.rdv_box .prestations .prestation:hover {
    background-color: #EEE;
}

.rdv_box .prestations .prestation .duree {
    white-space: nowrap;
    padding: 0 20px;
    text-align: right;
}

.rdv_box .prestations .prestation .montant {
    font-weight: bold;
    text-align: right;
}

.rdv_box .footer {
    background-color: #dad9d9;
    position: relative;
}

.rdv_box .footer .montant_total {
    position: absolute;
    bottom: 0px;
    left: 0px;
    top: 0px;
    background-color: #3f3f3f;
    border-radius: 0;
    min-width: 60px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 60px;
    padding-left: 10px;
    padding-right: 5px;
}

.rdv_box .footer .duree_totale {
    position: absolute;
    bottom: 0px;
    left: 80px;
    top: 0px;
    background-color: #3f3f3f;
    border-radius: 0;
    min-width: 60px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 60px;
    padding: 0 10px;
}

.rdv_box .footer .lieu {
    position: absolute;
    bottom: 0px;
    right: 0px;
    top: 0px;
    background-color: #3f3f3f;
    border-radius: 0;
    min-width: 60px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 60px;
    padding: 0 10px;

}

.rdv_box .footer button.annuler {
    position: absolute;
    bottom: 0px;
    right: 0px;
    top: 0px;
    background-color: #f44336;
    border-radius: 0;
    width: 60px;
    min-width: 60px;
    font-size: 1.2em;
}

.rdv_box .footer button.annuler:hover {
    background-color: #d32f2f;
    font-size: 1.5em;
}

.liste_prestations_to_add {
    margin-bottom: 20px;
}

.liste_prestations_to_add .prestation_to_add {
    display: grid;
    grid-template-columns: 30px 1fr 150px 100px 80px 80px;
    border-bottom: 1px solid #CCC;
    background-color: white;
    user-select: none;
}

.liste_prestations_to_add .prestation_to_add > div {
    padding: 10px;
}

.liste_prestations_to_add .prestation_to_add:hover {
    background-color: #DDD;
}

.liste_prestations_to_add .prestation_to_add>div.duree,
.liste_prestations_to_add .prestation_to_add>div.montant {
    white-space: nowrap;
    font-weight: bold;
}

.totaux_to_add .total,
.totaux_rdv_displayed .total {
    display: inline-block;
    padding: 10px;
    font-size: 1.2em;
    font-weight: bold;
    background-color: #45433f;
    color: white;
    position: relative;
}

.total .mini_paye {
    position: absolute;
    font-size: 0.5em;
    color: #CCC;
    top: -1px;
    right: 2px;
    left: 0px;
    text-align: right;
}

.mobile_only {
    display: none !important;
}

.desktop_only {
    display: revert !important;
}

.rdv_historique {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid #CCC;
    background-color: #EEE;
}


.rdv_historique .date {
    font-weight: bold;
    font-size: 1em;
    padding: 10px;
    background-color: var(--color-dark-brown);
    color: white;
}

.rdv_historique .rdv_site {
    text-align: center;
    font-size: 0.8em;
    background-color: #dad9d9;
    margin-bottom: 10px;
    padding: 5px;
}

.rdv_historique .prestations {
    padding: 10px;
}

.rdv_historique .footer {
    background-color: #dad9d9;
    display: flex;
}

.rdv_historique .footer .montant_total {
    background-color: #3f3f3f;
    border-radius: 0;
    width: 40px;
    min-width: 40px;
    font-size: 1em;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 40px;
}

.rdv_historique .footer .duree_totale {
    background-color: #3f3f3f;
    border-radius: 0;
    min-width: 40px;
    font-size: 1em;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 40px;
    padding: 0 10px;
    margin-left: 5px;
}

.form_add_rdv {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 10px;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: rotating 1s linear infinite;
}

.tdb {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 10px;
}

.tdb .tuile {
    border: 1px solid #CCC;
    padding: 15px;
    margin-top: 5px;
}

.tdb .tuile .header {
    font-weight: bold;
    font-size: 1.2em;
    border-bottom: 1px solid #CCC;
    margin-bottom: 10px;
}

.tdb .tuile .liste_element {
    line-height: 1.5em;
    font-size: 0.9em;
    cursor: pointer;
}

.tdb .tuile .liste_element:hover {
    background-color: #DDD;
    color: var(--color-red);
}

.tdb .tuile .liste_element.passe {
    color: #6b6b6b;
}

.tdb .tuile .liste_element.en_cours {
    font-weight: bold;
    color: var(--color-red);
}

.tdb .tuile .jour_semaine {
    font-size: 0.8em;
    margin-top: .25em;
}

.tdb .tuile .conflit {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    background-color: var(--color-red);
    color: white;
    padding: 3px;
}

a.link {
    color: var(--color-red);
    text-decoration: none;
    padding: 0px 20px 10px 20px;
    display: inline-block;
}

a.link::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--color-red);
    transition: all .5s;
    position: relative;
    top: 5px;
    left: -10px;
    width: calc(100% + 20px);
    transform: scaleX(0);
}

a.link:hover::after {
    transform: scaleX(1);
    transition: all .5s;
}

/* On mobile phones */
@media screen and (max-width: 800px) {

    .mobile_only {
        display: initial!important;
    }

    .desktop_only {
        display: none!important;
    }

    div.liste_prestations {
        padding: 2px;
    }
    
    div.liste_prestations .prestations {
        grid-template-columns: 1fr 100px 70px 70px;
    }

    div.liste_prestations .prestations .lib {
        grid-column: 1 / -1;
    }

    div.liste_prestations .prestations .duree {
        grid-column: 2;
        align-self: center;
        padding-right: 5px;
    }

    div.liste_prestations .prestations .tarif {
        grid-column: 3;
        align-self: center;
    }

    div.liste_prestations .prestations .choix {
        grid-column: -2;
        grid-row: 2 / 3;
    }

    div.liste_prestations.admin .prestations {
        grid-template-columns: 20px 1fr 100px 70px;
    }

    div.liste_prestations.admin .prestations .ordre {
        grid-row: 1 / -1;
    }

    div.liste_prestations.admin .prestations .lib {
        grid-column: 2 / -1;
    }

    div.liste_prestations.admin .prestations .tarif {
        text-align: right;
    }

    input.form_design {
        margin-bottom: 0px;
    }

    .rdv_box .contenu .utilisateur {
        padding-left: 5px;
        padding-top: 5px;
        background-color: #dad9d9;
        border-bottom: 1px solid #CCC;
    }

    .rdv_box.admin .contenu {
        display: grid;
        grid-template-rows: 30px 40px 1fr 60px;
        height: 100%;
    }

    .rdv_box .prestations .prestation {
        grid-template-columns: 1fr 100px 100px;
    }

    .rdv_box .prestations .prestation .lib {
        grid-column: 1 / -1;
    }

    .rdv_box .prestations .prestation .duree {
        grid-column: 2;
    }

    div.fiche_rdv .ligne_client_lieu {
        flex-direction: column;
    }

    div.fiche_rdv .ligne_infos {
        flex-direction: column;
    }

    .liste_prestations_to_add div.prestation_to_add {
        grid-template-columns: 30px 1fr 100px 100px 100px;
    }

    .liste_prestations_to_add div.prestation_to_add .puce {
        grid-column: 1 / 2;
    }

    .liste_prestations_to_add div.prestation_to_add .lib {
        grid-column: 2 / -1;
    }

    .liste_prestations_to_add div.prestation_to_add .quantite {
        grid-column: 1 / -1;
    }

    .liste_prestations_to_add div.prestation_to_add .duree {
        grid-column: 3 / 4;
    }

    .recap_ligne_presta {
        grid-template-columns: 1fr 120px 100px 70px;
    }

    .recap_ligne_presta .lib {
        grid-column: 1 / -1;
    }

    .recap_ligne_presta .quantite {
        grid-column: 1 / 3;
    }

    .recap_ligne_presta .duree {
        text-align: right;
        padding: 0;
    }

    .recap_ligne_presta.total {
        grid-template-columns: 1fr 100px 70px;
    }

    .recap_ligne_presta.total .lib {
        grid-column: 1/-1;
        text-align: left;
    }

    .form_add_rdv {
        grid-template-columns: 1fr;
    }

    .tdb {
        grid-template-columns: 1fr;
    }

}