@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&display=swap');

:root {
    --link-color: #00D8FF;
    --bg-color: rgba(80, 70, 70, 0.95);
}

body {
    background-image: url("../img/napomo_bg.jpg");
    background-color: bisque;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    padding: 0;
    margin: 0;
}

#retour {
    position: absolute;
    top: 25px;
    left: 25px;
    background-color: var(--bg-color);
    padding: 7px;
    border-radius: 10px;
    border: 1px solid white;

    a, a:visited {
        color: var(--link-color);
        text-decoration: none;
    }

    a:hover, a:active {
        color: #03B11A;
    }
}

header {
    text-align: center;
    font-size: 1.5em;

}

footer {
    min-height: 15px;
    background-color: var(--bg-color);
    width: 250px;
    margin: 10px auto;
    border-radius: 40px;
    border: 1px solid #B0B0B0;
    border-top: 0;
    text-align: center;
    padding: 2px 0 0;
    color: var(--link-color);
}

.liste-annees {
    display: inline-flex;
    list-style: none;
    margin: 0 0 20px;
    background: rgba(253, 253, 253, 0.8);
    padding: 7px;
    border-radius: 7px;

    .annee {
        margin: 0;
    }

    .annee + .annee::before {
        content: '|';
        margin: 0 10px;
    }

    a {
        text-decoration: none;
        color: black;
        font-weight: bold;
    }

    a:hover, .courante a {
        color: rgb(208, 0, 208);
    }
}


#calendrier {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 1em;
    list-style: none;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.jour {
    border: 2px solid black;
    border-radius: 1em;
    padding: 5px;
    height: 6vw;
    display: grid;
    grid-template-rows: 0 33% auto 30px;
    cursor: pointer;
}

.jour h1 {
    text-align: center;
    margin-top: 0;
    font-size: 2em;
}

.liste-theme {
    list-style: none;
    display: inline-flex;
    text-align: left;
    margin: 0;
    padding: 0;
}

.theme {
    border: 2px solid purple;
    text-align: center;
    padding: 3px;
    margin: 2px;
    border-radius: 8px;
    background-color: rgb(208, 0, 208);
}

.prefere {
    float: inline-start;
}

.poeme {
    background: rgba(100, 149, 237, 0.75);
}

.essai {
    background: rgba(0, 149, 0, 0.75);
}

.fiction {
    background: rgba(150, 100, 50, 0.75);
}

.futur {
    background: rgba(75, 75, 75, 0.75);
}

.hide {
    visibility: hidden;
}

#modal {
    max-width: 65%;
    margin: auto;
}

/*   Open state of the dialog  */
dialog[open] {
    opacity: 1;
    transform: scaleX(1);
}

/*   Closed state of the dialog   */
dialog {
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.5s ease-out,
    transform 0.5s ease-out,
    overlay 0.5s ease-out allow-discrete,
    display 0.5s ease-out allow-discrete;
    /* Equivalent to
    transition: all 0.7s allow-discrete; */
}

/*   Before-open state  */
/* Needs to be after the previous dialog[open] rule to take effect,
    as the specificity is the same */
@starting-style {
    dialog[open] {
        opacity: 0;
        transform: scaleX(0);
    }
}

/* Transition the :backdrop when the dialog modal is promoted to the top layer */
dialog::backdrop {
    background-color: rgb(0 0 0 / 0%);
    transition: display 0.5s allow-discrete,
    overlay 0.5s allow-discrete,
    background-color 0.5s;
    /* Equivalent to
    transition: all 0.7s allow-discrete; */
}

dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 75%);
}

/* This starting-style rule cannot be nested inside the above selector
because the nesting selector cannot represent pseudo-elements. */

@starting-style {
    dialog[open]::backdrop {
        background-color: rgb(0 0 0 / 0%);
    }
}

.etoile {
    font-size: 2em;
    color: orange;
    margin-top: -7px;

    .pleine:before {
        content: "\2605";
    }

    .vide:before {
        content: "\2606";
    }
}

#ajout {
    background-color: var(--bg-color);
    border-radius: 15px;
    width: 900px;
    margin: auto;
    padding: 20px;
    color: white;

    label {
        display: inline-block;
        width: 100px;
        margin-bottom: 10px;
    }
}

#conteneur-admin {
    display: grid;
    grid-template-columns: 250px auto;
}

#anciens-texte {
    margin-left: 20px;
    background-color: var(--bg-color);
    border-radius: 15px;
    padding: 20px;
    color: white;

    li {
        cursor: pointer;
    }
}

.hide {
    display: none;
}

dialog {
    border-radius: 20px;
    padding: 30px;

    label {
        display: inline-block;
        width: 100px;
        margin-bottom: 10px;
    }

    #fermer-modal {
        position: absolute;
        top: 15px;
        right: 15px
    }
}

#div-pwd {
    position: absolute;
    top: 25px;
    right: 25px;

    background-color: var(--bg-color);
    padding: 7px;
    border-radius: 10px;
    border: 1px solid white;
}

#texte-jour {
    font-family: "Dosis", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-size: 1.2em;
}

#credit-photo{
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    text-align: end;
}
