/*
    ================================
        Best Viewed In Full Page
    ================================
*/

/* Because I'm using the fixed position for modals, if the screen height is small then you would not be able to see a full modal that's why it's recommended that you see this pen in full-page and not on editor view. */

/* defaults */
/*
*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/


body {
    --light: hsl(220, 50%, 90%);
    --primary: hsl(255, 30%, 55%);
    --focus: hsl(40, 100%, 44%);
    --border-color: hsla(0, 0%, 100%, .2);
    --global-background: hsl(220, 25%, 10%);
    --background: linear-gradient(to right, hsl(0, 0%, 16%), hsl(0, 0%, 12%));
    /*  --background: linear-gradient(to right, hsl(210, 30%, 20%), hsl(255, 30%, 25%)); */
    --shadow-1: hsla(236, 50%, 50%, .3);
    --shadow-2: hsla(236, 50%, 50%, .4);

    /*
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', sans-serif;
    color: var(--light);
    background: var(--global-background);
    */
}




/* using :target */
/*
when users will click/enter button(link) browser will add a #id in a url and when that happens we'll show our users the modal that contains that id.
*/
.modal-container:target {
    display: flex;
}

.modal-content {
    width: 60rem;
    /* TODO synchroniser avec style du index.html et mediaquery pour responsive */
    padding: 2rem 2rem;
    border-radius: .8rem;

    color: var(--light);
    background: var(--background);
    box-shadow: var(--m-shadow, .4rem .4rem 10.2rem .2rem) var(--shadow-1);
    position: relative;

    overflow: hidden;
}

.modal__title {
    /*font-size: 3.2rem;*/
}

.modal__text {
    padding: 0 4rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;

    /*font-size: 1.6rem;
  line-height: 2;*/
}

/* link-... */
.link-2 {
    width: 4rem;
    height: 4rem;
    border: 1px solid var(--border-color);
    border-radius: 100rem;

    color: inherit;
    /*font-size: 2.2rem;*/

    position: absolute;
    top: 1rem;
    right: 1rem;

    display: flex;
    justify-content: center;
    align-items: center;

    transition: .2s;
    font-family: inherit;
    text-decoration: none;
}

.link-2::before {
    content: '×';

    transform: translateY(-.1rem);
}

.link-2:hover,
.link-2:focus {
    background: var(--focus);
    border-color: var(--focus);
    transform: translateY(-.2rem);
    outline: none;
}

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top // TODO à améliorer pour centrer */
    padding-top: 20%;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.8);
    /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    background-color: white;
    /* #fefefe;*/
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /*color: black;*/
}

/* The Close Button */
.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.MainNavText .ellipsis , .MainNavText:hover .ellipsis {
    color: #e19500;
}

/*  ###################################### */
/* modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;

    display: none;
    justify-content: center;
    align-items: center;

    width: 100%;
    height: 100%;

    /* --m-background is set as inline style */
    background: var(--m-background);
}
