@layer base {
    fieldset {
        padding: 12px;
    }

    fieldset {
        border: 1px solid var(--local-color-decor-studies-group-line);
        border-radius: var(--local-radius-studies-group);
    }
}

@layer components {

    .main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        position: relative;
        z-index: 0;
        min-height: 100vh;
        margin-bottom: 30vh;
    }

    .studies {
        margin-top: 10vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 24px;
    }

    .studies-item {
        width: 70vw;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        padding: 16px;
    }

    .studies-item h3 {
        width: 55px;
        margin-block: 1em;
    }

    .studies-item div {
        display: inline-block;
        align-items: center;
        width: 10px;
    }

    .studies-item p {
        padding-left: 8px;
        width: calc(100% - 65px);
        margin-block: 1em;
    }

    .studies-item a {
        width: 100%;
    }

    /*==========================
       BLOCK ETUDE
       ========================== */
    .study {
        margin-top: 10vh;
        display: flex;
        flex-direction: column;
        width: 70vw;
    }

    .line-1 {
        padding: 6px 20px 3px 20px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
    }

    .line-1 svg {
        min-height: 30px;
        height: 30px;
        max-height: 30px;
        width: 30px;
    }

    :where(.line-1) h3 {
        margin-block: 1em;
    }

    :where(.line-1) p {
        margin-block: 1em;
    }

    .line-2 {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }

    .document-line {
        width: calc(100% - 6vw);
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.8rem;
        padding-left: 3vw;
        padding-right: 3vw;
    }

    :where(.document-line) p {
        margin-block: 1em;
    }

    .line-3 {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 12px;
    }

    .line-3 a {
        width: 300px;
    }

    .line-4 {
        height: 3rem;
        padding: 30px 30px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    /* =========================
       IA MENTION
       ========================= */
    .text-block {
        margin-top: 20px;
        width: 80vw;
        padding: 4vw;
    }

    fieldset legend img {
        height: 1.3rem;
        width: auto;
        margin-right: 2px;
    }

    fieldset legend {
        height: 1.3rem;
        width: auto;
    }

    .text-block h2 {
        margin-bottom: 4px;
    }

    :where(.text-block) fieldset {
        margin-inline: 2px;
    }

    :where(.text-block) legend {
        padding-inline: 2px;
    }

    .divider {
        margin-top: 1.3rem;
        margin-bottom: 1.3rem;
    }

    :where(.study-lead) h2,
    :where(.study-level) h2,
    :where(.study-assistance) h2 {
        margin-top: 0.83em;
    }

    :where(.study-lead) p,
    :where(.study-level) p,
    :where(.study-assistance) p {
        margin-block: 1em;
    }

    .studies-item {
        border: 2px solid var(--local-color-decor-studies-item-line);
        border-radius: var(--local-radius-studies-group);
        background-color: var(--raw-color-pearl-1);
        border: 1px solid var(--raw-color-white-90);
    }

    .study {
        background-color: none;
        border: 1px solid var(--raw-color-white-90);
        border-radius: var(--local-radius-studies-study);
        backdrop-filter: blur(8px);
    }

    .line-1 {
        border-radius: var(--local-radius-studies-line);
        background-color: var(--local-color-decor-studies-line-surface);
    }

    .line-1 svg {
        fill: none;
        stroke-width: 2px;
    }

    .line-2 {
        background-color: var(--raw-color-pearl-2);
    }

    .document-line {
        background-image: linear-gradient(170deg, var(--raw-color-pearl-1), var(--raw-color-pearl-2));
        border-top: 1px solid var(--raw-color-white-90);
    }

    .document-line:hover {
        background-color: var(--raw-color-pearl-1);
        background-image: none;
    }

    .line-3 {
        background-color: var(--local-color-decor-studies-line-surface);
    }

    .line-3 a {
        border: none;
    }

    .line-3 a:hover {
        filter: brightness(1.4);
        border: none;
    }

    .line-4 {
        background-color: var(--local-color-decor-studies-line-surface);
        border-radius: var(--local-radius-studies-line-2);
    }

    .text-block {
        background-image: linear-gradient(to bottom, var(--local-color-decor-studies-text-block-surface), var(--local-color-decor-studies-text-block-surface-2));
        backdrop-filter: blur(8px);
        border-radius: var(--local-radius-studies-study);
    }

    .studies-item h3 {
        font-size: var(--canon-size-body);
        font-weight: 600;
    }

    .studies-item div {
        font-size: var(--canon-size-body);
        font-weight: bold;
        text-align: center;
    }

    .studies-item p {
        font-size: var(--canon-size-note);
        font-weight: 400;
    }

    .line-1 {
        color: var(--local-color-decor-studies-line-ink);
    }

    :where(.line-1) h3 {
        text-shadow: var(--local-shadow-studies-subtitle);
        font-size: var(--canon-size-body);
        font-weight: 600;
        color: inherit;
    }

    :where(.line-1) p {
        font-size: var(--canon-size-note);
        font-weight: 400;
        color: inherit;
    }

    .document-line {
        font-size: var(--canon-size-note);
        font-weight: 400;
    }

    .line-3 a {
        color: var(--local-color-decor-studies-line-ink);
    }

    .line-3 a:hover {
        color: var(--local-color-decor-studies-link-hover-ink);
    }

    .text-block {
        font-size: var(--canon-size-note);
        color: var(--local-color-decor-studies-text-block-ink);
    }

    fieldset legend img {
        vertical-align: middle;
    }

    fieldset legend {
        vertical-align: middle;
        font-weight: 400;
        font-size: var(--canon-size-body);
        color: var(--local-color-decor-studies-legend-ink);
    }

    .text-block h2 {
        font-family: var(--canon-font-figura);
        font-size: var(--canon-size-body);
        font-weight: 600;
        text-transform: uppercase;
    }

    :where(.study-lead) h2,
    :where(.study-level) h2,
    :where(.study-assistance) h2 {
        color: inherit;
    }

    :where(.study-lead) p,
    :where(.study-level) p,
    :where(.study-assistance) p {
        color: inherit;
    }

}
