/*
Theme Name:   Quant
Theme URI:    https://example.com/
Description:  Child theme for Twenty Twenty-Five
Author:       YNY Solutions Inc.
Author URI:   https://example.com/
Template:     twentytwentyfive
Version:      1.5.123
Text Domain:  quant
*/

/* ============================================================================
   CSS Variables
   ========================================================================= */

:root {
    /* Font */
    --font-family-primary: 'Zalando Sans', sans-serif;

    /* Desktop Typography - Paragraph */
    --body-i-font-size: 20px;
    --body-i-line-height: 140%;
    --body-m-font-size: 18px;
    --body-m-line-height: 160%;
    --body-s-font-size: 16px;
    --body-s-line-height: 140%;
    --body-xs-font-size: 14px;
    --body-xs-line-height: 140%;
    --body-xxs-font-size: 12px;
    --body-xxs-line-height: 140%;

    /* Desktop Typography - Headings */
    --h1-font-size: 80px;
    --h1-line-height: 100%;
    --h2-font-size: 32px;
    --h2-line-height: 100%;
    --h3-font-size: 24px;
    --h3-line-height: 110%;
    --h4-font-size: 20px;
    --h4-line-height: 140%;
    --h4-med-font-size: 24px;
    --h4-med-line-height: 140%;
    --h5-font-size: 20px;
    --h5-line-height: 140%;

    /* Mobile Typography - Paragraph */
    --mobile-body-i-font-size: 20px;
    --mobile-body-i-line-height: 140%;
    --mobile-body-m-font-size: 18px;
    --mobile-body-m-line-height: 160%;
    --mobile-body-s-font-size: 16px;
    --mobile-body-s-line-height: 140%;
    --mobile-body-xs-font-size: 14px;
    --mobile-body-xs-line-height: 140%;
    --mobile-body-xxs-font-size: 12px;
    --mobile-body-xxs-line-height: 140%;

    /* Mobile Typography - Headings */
    --mobile-h1-font-size: 40px;
    --mobile-h1-line-height: 100%;
    --mobile-h2-font-size: 32px;
    --mobile-h2-line-height: 100%;
    --mobile-h3-font-size: 32px;
    --mobile-h3-line-height: 140%;
    --mobile-h4-font-size: 20px;
    --mobile-h4-line-height: 140%;
    --mobile-h4-med-font-size: 24px;
    --mobile-h4-med-line-height: 140%;
    --mobile-h5-font-size: 20px;
    --mobile-h5-line-height: 140%;

    /* Colors */
    --black: #000000;
    --white: #ffffff;
    --gray: #dddce5;
    --dark-gray: #676767;

    /* Gradients */
    --gradient-module-1: linear-gradient(90deg, #8896f7 0%, #fbbfff 63.46%, #ffbdb1 100%);
    --gradient-module-2: linear-gradient(90deg, #ffa246 0%, #ffcd62 31.73%, #b7cfe3 75.48%, #b7cfe3 100%);
    --gradient-module-3: linear-gradient(90deg, #e4edf6 0%, #ff75e4 63.46%, #ff7662 100%);
    --gradient-module-4: linear-gradient(90deg, #f7ff5c 0%, #82db8b 63.46%, #397c73 100%);
}

/* ============================================================================
   Base Styles
   ========================================================================= */

#wpadminbar {
    z-index: 200000 !important;
}

body,
html {
    overflow-x: hidden;
}

body {
    overflow-y: hidden;
    font-family: var(--font-family-primary);
    color: var(--dark-gray);
    font-weight: 400;
    letter-spacing: -0.02em !important;
}

/* ============================================================================
   Focus States
   ========================================================================= */

:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #E651C6;
}

:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* ============================================================================
   Utility Classes
   ========================================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hanging-indent {
    padding-left: 1.27cm;
    text-indent: -1.27cm;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ============================================================================
   Typography - Paragraphs and Lists
   ========================================================================= */

p,
ul,
li {
    font-size: var(--body-m-font-size);
    line-height: var(--body-m-line-height);

    @media (max-width: 600px) {
        font-size: var(--mobile-body-m-font-size);
        line-height: var(--mobile-body-m-line-height);
    }
}

p.intro {
    font-size: var(--body-i-font-size);
    line-height: var(--body-i-line-height);

    @media (max-width: 600px) {
        font-size: var(--mobile-body-i-font-size);
        line-height: var(--mobile-body-i-line-height);
    }
}

p.small,
ul.small,
li.small,
ol.small {
    font-size: var(--body-s-font-size) !important;
    line-height: var(--body-s-line-height) !important;

    @media (max-width: 600px) {
        font-size: var(--mobile-body-s-font-size);
        line-height: var(--mobile-body-s-line-height);
    }
}

p.xsmall,
ul.xsmall,
li.xsmall,
ol.xsmall {
    font-size: var(--body-xs-font-size) !important;
    line-height: var(--body-xs-line-height) !important;

    @media (max-width: 600px) {
        font-size: var(--mobile-body-xs-font-size);
        line-height: var(--mobile-body-xs-line-height);
    }
}

p.xxsmall,
ul.xxsmall,
li.xxsmall,
ol.xxsmall {
    font-size: var(--body-xxs-font-size) !important;
    line-height: var(--body-xxs-line-height) !important;

    @media (max-width: 600px) {
        font-size: var(--mobile-body-xxs-font-size);
        line-height: var(--mobile-body-xxs-line-height);
    }
}

/* ============================================================================
   Typography - Headings
   ========================================================================= */

h1 {
    font-size: var(--h1-font-size);
    line-height: var(--h1-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h1-font-size);
        line-height: var(--mobile-h1-line-height);
    }
}

h2 {
    font-size: var(--h2-font-size);
    line-height: var(--h2-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h2-font-size);
        line-height: var(--mobile-h2-line-height);
    }
}

h3 {
    font-size: var(--h3-font-size) !important;
    line-height: var(--h3-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h3-font-size);
        line-height: var(--mobile-h3-line-height);
    }
}

h4 {
    font-size: var(--h4-font-size);
    line-height: var(--h4-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h4-font-size);
        line-height: var(--mobile-h4-line-height);
    }
}

h4.med {
    font-size: var(--h4-med-font-size) !important;
    line-height: var(--h4-med-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h4-med-font-size);
        line-height: var(--mobile-h4-med-line-height);
    }
}

h5 {
    font-size: var(--h5-font-size) !important;
    line-height: var(--h5-line-height);
    color: var(--black);

    @media (max-width: 600px) {
        font-size: var(--mobile-h5-font-size);
        line-height: var(--mobile-h5-line-height);
    }
}

strong {
    font-weight: 500 !important;
}

/* ============================================================================
   Containers
   ========================================================================= */

.module-container,
.answer-guide-container {
    margin: 0 auto;
    width: 1401px;
    padding: 0;
    gap: 20px;

    /* Reset margins */
    h2,
    h3,
    h5,
    p,
    ul {
        margin-top: 0;
    }

    p {
        color: #676767;
    }
}

/* ============================================================================
   Third-Party Components
   ========================================================================= */

/* Latex Math */
.wp-block-math semantics, 
.katex {
    color: black !important;
    font-size: 18px !important;
}

.wp-block-math,
.wp-block-math math,
code .quant-inline-math {
    font-size: var(--body-m-font-size);
    line-height: var(--body-m-line-height);
    color: black;
    font-family: var(--font-family-primary);

    @media (max-width: 600px) {
        font-size: var(--mobile-body-m-font-size);
        line-height: var(--mobile-body-m-line-height);
    }
}

.wp-block-math.small,
.wp-block-math.small math,
.small code .quant-inline-math {
    font-size: var(--body-s-font-size) !important;
    line-height: var(--body-s-line-height) !important;

    @media (max-width: 600px) {
        font-size: var(--mobile-body-s-font-size) !important;
        line-height: var(--mobile-body-s-line-height) !important;
    }
}

.wp-block-math.xsmall,
.wp-block-math.xsmall math,
.xsmall code .quant-inline-math {
    font-size: var(--body-xs-font-size) !important;
    line-height: var(--body-xs-line-height) !important;

    @media (max-width: 600px) {
        font-size: var(--mobile-body-xs-font-size) !important;
        line-height: var(--mobile-body-xs-line-height) !important;
    }
}

/* ============================================================================
   Header Components
   ========================================================================= */

.header-container {
    display: grid;
    grid-template-columns: 927px 453px;
    grid-template-rows: min-content min-content;
    gap: 20px;
    max-width: 1401px;

    .module-name {
        grid-column: 1;
        grid-row: 1 / 3;
        position: relative;
        width: 927px;
        height: 100%;
        padding: 24px;
        box-sizing: border-box;

        /* Main content wrapper - left side */
        >.wp-block-group:first-child {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 16px;
            position: absolute;
            left: 24px;
            bottom: 24px;
            max-width: 600px;

            /* Module tag */
            .module-number {
                color: #000;
                padding: 3px 8px;
                margin: 0;
                background: rgba(255, 255, 255, 0.5);
                border-radius: 30px;
            }

            /* Main title */
            h2 {
                margin: 0;
            }
        }

        /* Surtitle section - right side box */
        >.wp-block-group:last-child {
            display: contents;

            /* Surtitle inner container */
            .surtitle {
                position: absolute;
                right: 24px;
                top: 24px;
                justify-content: space-between;
                width: 201px;
                height: 161px;
                padding: 16px;
                box-sizing: border-box;
                background: #000;

                /* Star icon */
                &::before {
                    content: "";
                    width: 16px;
                    height: 14px;
                    background-color: #fff;
                    -webkit-mask-image: url("/wp-content/uploads/2026/02/white_star.svg");
                    mask-image: url("/wp-content/uploads/2026/02/white_star.svg");
                    -webkit-mask-size: contain;
                    mask-size: contain;
                    -webkit-mask-repeat: no-repeat;
                    mask-repeat: no-repeat;
                    -webkit-mask-position: center;
                    mask-position: center;
                }

                /* Learn to Read text */
                p.small {
                    color: #fff !important;
                }
            }

            /* Print button */
            .print-btn {
                position: absolute;
                right: 26px;
                bottom: 25px;
                display: inline-flex;
                align-items: center;
                padding: 11px 16px;
                gap: 120px;
                background: rgba(0, 0, 0, 0.5);
                backdrop-filter: blur(2px);
                border-radius: 30px;
                color: #fff;
                margin: 0;
                cursor: pointer;

                /* Print icon */
                &::after {
                    content: "";
                    width: 16px;
                    height: 16px;
                    background-color: currentColor;
                    -webkit-mask-image: url("/wp-content/uploads/2025/12/Icone.svg");
                    mask-image: url("/wp-content/uploads/2025/12/Icone.svg");
                    -webkit-mask-size: contain;
                    mask-size: contain;
                    -webkit-mask-repeat: no-repeat;
                    mask-repeat: no-repeat;
                    -webkit-mask-position: center;
                    mask-position: center;
                }

                &:hover {
                    background: rgba(0, 0, 0, 1);
                }
            }
        }
    }

    .goals,
    .theories {
        h4 {
            color: white;
        }
    }

    .goals {
        grid-column: 2;
        grid-row: 1;
    }

    .theories {
        grid-column: 2;
        grid-row: 2;
    }

    /* Mobile Styles */
    @media (max-width: 950px) {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 100%;

        .module-name {
            width: 100% !important;
            height: 660px !important;
            padding: 16px !important;
            box-sizing: border-box;

            /* Title wrapper */
            >.wp-block-group:first-child {
                left: 16px !important;
                bottom: 83px !important;
                width: calc(100% - 32px) !important;
                max-width: none !important;
                gap: 16px !important;
            }

            /* Surtitle section */
            >.wp-block-group:last-child {

                /* Surtitle inner container */
                .surtitle {
                    right: 16px !important;
                    top: 16px !important;
                    width: 145px !important;
                    height: 124px !important;
                    padding: 16px !important;
                }

                .surtitle::before {
                    content: "" !important;
                    display: block !important;
                    width: 16px;
                    height: 14px;
                    background-color: #fff;
                    -webkit-mask-image: url("/wp-content/uploads/2026/02/white_star.svg");
                    mask-image: url("/wp-content/uploads/2026/02/white_star.svg");
                    -webkit-mask-size: contain;
                    mask-size: contain;
                    -webkit-mask-repeat: no-repeat;
                    mask-repeat: no-repeat;
                    -webkit-mask-position: center;
                    mask-position: center;
                }

                /* Print button */
                .print-btn {
                    position: absolute !important;
                    left: 16px !important;
                    bottom: 16px !important;
                    right: auto !important;
                    gap: 66px !important;
                    padding: 11px 16px !important;
                }
            }
        }
    }
}

.goals,
.theories {
    color: #fff;
    background-color: #000;
    padding: 24px;
    box-sizing: border-box;

    h5,
    p {
        color: #fff !important;
    }

    h4 {
        margin-bottom: 85px !important;
    }

    ul {
        width: 100%;
        padding-left: 0;
        margin-bottom: 0;
        list-style: none;

        li {
            display: flex;
            align-items: center;
            gap: 21px;
            font-size: 14px;
            line-height: 140%;
            color: #fff;

            &::before {
                content: "" !important;
                display: block !important;
                width: 14px;
                height: 8px;
                min-width: 14px;
                min-height: 8px;
                background-color: #fff;
                -webkit-mask-image: url(/wp-content/uploads/2025/12/Vector-2.svg);
                mask-image: url(/wp-content/uploads/2025/12/Vector-2.svg);
                -webkit-mask-size: contain;
                mask-size: contain;
                -webkit-mask-repeat: no-repeat;
                mask-repeat: no-repeat;
                -webkit-mask-position: center;
                mask-position: center;
                flex-shrink: 0;
            }

            &:not(:last-child) {
                border-bottom: 1px solid rgba(255, 255, 255, 0.5);
                padding-bottom: 11px;
                margin-bottom: 11px;
            }
        }
    }
}

/* ============================================================================
   Reflection Section
   ========================================================================= */

.reflection-container {
    max-width: 1401px;
    width: 100%;
    padding: 24px;
    background-color: #000;
    margin-bottom: 21px !important;
    justify-content: space-between;

    h2 {
        width: 50%;
        margin: 0;
        color: #fff;
        align-self: flex-start;
    }

    div {
        width: 40%;
        padding-top: 30px;
        align-self: flex-end;
        gap: 18px;
    }

    p {
        margin: 0;
        color: #fff;
        align-self: flex-end;
    }

    @media (max-width: 1400px) {
        width: 100%;
        box-sizing: border-box
    }

    @media (max-width: 950px) {
        flex-direction: column;

        h2,
        p {
            width: 100%;
            padding-top: 0;
        }

        div {
            margin-top: 224px;
            gap: 24px;
            width: 100%;
        }
    }
}

/* ============================================================================
   Dropdown Components
   ========================================================================= */

.dropdowns {
    width: 100%;

    .dropdown {
        display: flex;
        justify-content: space-between;
        width: 100%;
        max-width: 926px;
        margin: 0;
        border-top: 1px solid #000;
        box-sizing: border-box;

        &:last-child {
            border-bottom: 1px solid #000;
        }

        .title {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            width: calc(100% - 48px);
            margin: 29px 24px 29px 24px !important;
            color: #000 !important;
            gap: 16px;
            cursor: pointer;
        }

        .dropdown-icon {
            display: inline-block;
            width: 32px;
            height: 32px;
            margin-left: auto;
            transition: transform 0.3s ease;
            flex-shrink: 0;
            box-sizing: content-box;
        }

        .content {
            padding: 0 24px 24px 24px;

            p,
            li,
            ol,
            ul {
                font-size: 16px !important;
            }

            ol,
            ul {
                padding-inline-start: 26px !important;
            }

            li {
                margin-top: 15px !important;
            }
        }

        &.is-open {
            .dropdown-icon {
                transform: rotate(180deg);
            }

            .title {
                margin-bottom: 8px !important;
            }
        }

        &:not(.is-open)>*:not(.title) {
            display: none !important;
        }

        @media (max-width: 640px) {
            .title {
                width: 100% !important;
                margin: 0 !important;
                padding: 21px 16px !important;
                font-size: 16px !important;
                box-sizing: border-box !important;
                align-items: center;
            }

            .content {
                padding: 0 56px 0px 16px;
            }

            &.is-open {
                padding-bottom: 16px !important;

                .title {
                    margin: 0 !important;
                    width: 100% !important;
                }
            }
        }
    }
}

/* ============================================================================
   Answer Guide Container
   ========================================================================= */

.answer-guide-container {
    .dropdowns {
        margin-top: 0px !important;

        .dropdown {
            gap: 23px !important;

            .question-card:last-child {
                margin-bottom: 48px !important;
            }

            p,
            li {
                font-size: 16px;
            }
        }
    }
}

ol.wp-block-list ol.wp-block-list {
    list-style-type: lower-alpha;
    padding-left: 1.75em;
}

.reflection-module-4 {
    max-width: 926px;
    width: 100%;
    margin-top: -20px !important;
    margin-bottom: 20px !important;
}

.question-card-katex {
    font-size: 18px !important;
}

/* Complianz */
.cmplz-title {
    font-size: 18px !important;
}

.cmplz-message {
    p {
        font-size: 15px !important;
        margin-bottom: 0 !important;
    }
}

/* Complianz – icône du détail (functional, etc.) */
details.cmplz-category[open] .cmplz-icon.cmplz-open {
    margin-top: 8px;
}

details.cmplz-category:not([open]) .cmplz-icon.cmplz-open {
    margin-top: -10px;
}


/* Hanging indent for source */
.indent {
    padding-left: 1.27cm;
    text-indent: -1.27cm;
}