@import "https://vps.birdywood.fr/css/material.css";

:root {
    /* Couleurs des cartes */
    --card-1: #ff9a8b;
    /* Rose clair */
    --card-2: #90d5ec;
    /* Bleu ciel */
    --card-3: #a8e6cf;
    /* Vert menthe */
    --card-4: #fffea6;
    /* Blanc */
    --card-5: #fff8dc;
    /* Beige clair */
    --card-6: #f0f0f0;
    /* Gris très clair */
    --card-7: #e6e6fa;
    /* Lavande clair */
}

* {
    box-sizing: border-box;
}

body {
    margin: var(--margin-body);
    color: var(--text);
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: calc(100dvh - var(--margin-body) * 2);
    overflow-x: hidden;
}

@media screen and (max-width: 650px) {
    :root {
        --margin-body: 1rem;
    }

}

#install-app {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100dvw - 2 * var(--margin-body));
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: var(--margin-body);
    gap: 1rem;
    color: var(--text);
    background-color: var(--secondary);
    border-radius: 1rem;
    font-weight: bold;
}

#install-app button {
    border: none;
    background-color: var(--primary);
    color: var(--secondary);
    padding: 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 1rem;
}

#install-app .dismiss {
    background-color: transparent;
    color: var(--text)
}

header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 56px;
}

header>div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    flex: 1;
    width: 100%;

    background-color: var(--secondary);
    border-radius: 2rem;

}

header h1,
header input[type="search"],
header button {
    padding: 1rem;
    border-radius: 2rem;
    border: none;
    outline: none;
    margin: 0;
    color: var(--text);
}

header h1 {
    user-select: none;
    background-color: transparent;
    padding: 0;
}

header button {
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--primary);
    color: var(--secondary);

    border-radius: 2rem;

    font-size: 1rem;
    cursor: pointer;

    /* width: 56px; */
    height: 56px;

}

header input[type="search"] {
    flex: 1;
    font-size: 1rem;
    cursor: text;
    color: var(--text);
    background-color: transparent;
    width: inherit;

}

@media screen and (max-width: 650px) {
    header {
        flex-direction: column;
        height: auto;
    }

    header h1 {
        background-color: transparent;
        text-align: center;
    }
}

main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 2rem;
    min-height: 300px;
    height: 25vh;
    /* width: 300px; */
    flex: 1 1 25vmax;

    transition: height 0.3s ease-in-out, transform 0.3s ease-in-out, width 0.3s ease-in-out;

    cursor: pointer;

    overflow: hidden;
}

card.notFiltered {
    display: none;
}

card:not([active]):hover {
    transform: scale(1.05);
}

card .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    padding-bottom: 1rem;
}

card .title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    margin-bottom: 1rem;
    flex: 1;
    font-family: var(--font-family-headings);
    font-size: 2rem;
    margin: 0;
}

card .preview {
    flex: 1;
    overflow: hidden;
}

card .editor {
    display: none;
    flex: 1;
    overflow: hidden;
}

card .editor textarea {
    width: 100%;
    height: 100%;
    resize: none;
    border: none;
    padding: 1rem;
    margin: 0;
    border-radius: 2rem;
    outline: 0;
    background-color: transparent;
    color: var(--text);
    font-family: var(--font-family-body);

    transition: background-color .3s;
}

card .editor textarea:focus {
    background-color: var(--secondary);
}

card .header button {
    display: none;
    background: var(--surface);
    color: var(--text);
    outline: none;
    border: none;
    padding: 0rem;
    border-radius: 50%;
    cursor: pointer;

    font-weight: bolder;
    font-size: larger;

    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;
}

card .toolbar {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 2rem;
    gap: .5rem;
    overflow-y: hidden;
    overflow-x: auto;
    flex-wrap: nowrap;
    height: 0;
    transition: height .3s ease-in-out;
}

card .toolbar button {
    /* Like chips */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .4rem .8rem;
    background-color: var(--secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 4px;

    transition: background-color .3s ease-in-out;
}

card .toolbar button:hover,
card .toolbar button:active {
    background-color: var(--surface);
}

card .toolbar button:focus {
    background-color: var(--surface);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

card[active] {
    z-index: 99999;
    position: fixed;
    top: 0;
    left: 0;
    /* margin: var(--margin-body); */
    width: calc(100dvw - 0 * var(--margin-body));
    height: calc(100dvh - 0 * var(--margin-body));
    cursor: auto;
    border-radius: 0;
}

card[active] .title {
    overflow: visible;
    display: block;
    overflow-wrap: inherit;
}

card[active] .toolbar {
    height: fit-content;
}

card[active] .header button {
    display: flex;
}

card[active] .preview {
    display: none;
    overflow-y: auto;
    break-inside: auto;
}

card[active][see] .preview {
    display: block;
}

card[active] .editor {
    display: flex;
}

card[active][see] .editor {
    display: none;
}



.container-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}