* {
    box-sizing: border-box;
}


/* =========================
   VARIABLES — MODE NUIT
========================= */

:root {

    --fond: #000000;

    --texte: #c9c6c1;
    --titre: #e5e2dd;
    --secondaire: #96928d;
    --livre: #68645f;
    --fleche: #4e4b47;

    --chapitre: #45423f;
    --chapitre-actif: #ccc8c2;

    --numero-verset: #77736e;

    --navigation: #504d49;
    --bordure: #181818;

    --menu-fond: #0d0d0d;
    --menu-bordure: #202020;
    --menu-hover: #171717;

    --selection-fond: #30302e;
    --selection-texte: #e7e3dd;

    --transition-theme:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease;
}


/* =========================
   MODE JOUR
========================= */

body.mode-jour {

    --fond: #FFFFFF;

    --texte: #333333;
    --titre: #333333;

    --secondaire: #666666;
    --livre: #666666;
    --fleche: #787878;

    --chapitre: #999999;
    --chapitre-actif: #333333;

    --numero-verset: #666666;

    --navigation: #666666;
    --bordure: #E6E6E6;

    --menu-fond: #FFFFFF;
    --menu-bordure: #E1E1E1;
    --menu-hover: #F5F5F5;

    --selection-fond: #DCDCDC;
    --selection-texte: #333333;
}


/* =========================
   DOCUMENT
========================= */

html {
    background: var(--fond);

    transition:
        background-color 0.35s ease;
}

body {

    margin: 0;

    background: var(--fond);

    color: var(--texte);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    -webkit-font-smoothing: antialiased;

    text-rendering: optimizeLegibility;

    transition:
        background-color 0.35s ease,
        color 0.35s ease;
}

button,
input,
label {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =========================
   PAGE
========================= */

.page {

    max-width: 760px;

    margin: 0 auto;

    padding:
        58px
        32px
        110px;
}


/* =========================
   EN-TÊTE
========================= */

.header {

    position: relative;

    text-align: center;

    margin-bottom: 58px;
}

.header h1 {

    margin:
        0
        0
        38px;

    color: var(--titre);

    font-size: 34px;

    line-height: 1;

    font-weight: normal;

    letter-spacing: 0.1px;

    transition:
        color 0.35s ease;
}


/* =========================
   BOUTON THÈME
========================= */

.theme-switch {

    position: absolute;

    top: -2px;

    right: 0;
}

#theme-toggle {

    width: 30px;

    height: 30px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--secondaire);

    font-size: 17px;

    line-height: 30px;

    text-align: center;

    opacity: 0.7;

    transition:
        color 0.25s ease,
        opacity 0.25s ease,
        transform 0.35s ease;
}

#theme-toggle:hover {

    color: var(--titre);

    opacity: 1;

    transform: rotate(8deg);
}


/* =========================
   TESTAMENT
========================= */

.menu-testament {

    position: relative;

    width: fit-content;

    margin:
        0
        auto
        15px;
}

#testament-trigger {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--secondaire);

    font-size: 15px;

    line-height: 1.4;

    font-weight: normal;

    transition:
        color 0.25s ease;
}

#testament-trigger:hover {

    color: var(--titre);
}


/* =========================
   LIVRE
========================= */

.menu-livre {

    position: relative;

    width: fit-content;

    margin: 0 auto;
}

#livre-trigger {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--livre);

    font-size: 12px;

    line-height: 1.4;

    font-weight: normal;

    letter-spacing: 4px;

    text-transform: uppercase;

    transition:
        color 0.25s ease;
}

#livre-trigger:hover {

    color: var(--secondaire);
}


/* =========================
   FLÈCHES
========================= */

.fleche {

    color: var(--fleche);

    font-size: 13px;

    line-height: 1;

    letter-spacing: 0;

    position: relative;

    top: -1px;

    transition:
        color 0.25s ease;
}

#testament-trigger:hover .fleche,
#livre-trigger:hover .fleche {

    color: var(--secondaire);
}


/* =========================
   MENUS DÉROULANTS
========================= */

.menu-options {

    display: none;

    position: absolute;

    z-index: 50;

    top: calc(100% + 13px);

    left: 50%;

    transform: translateX(-50%);

    min-width: 200px;

    max-height: 310px;

    overflow-y: auto;

    padding: 6px;

    background: var(--menu-fond);

    border:
        1px solid
        var(--menu-bordure);

    box-shadow:
        0
        18px
        45px
        rgba(0, 0, 0, 0.20);

    transition:
        background-color 0.35s ease,
        border-color 0.35s ease;
}

.menu-options.ouvert {
    display: block;
}

.menu-options button {

    display: block;

    width: 100%;

    padding:
        9px
        13px;

    border: 0;

    background: transparent;

    color: var(--secondaire);

    font-size: 13px;

    line-height: 1.35;

    text-align: left;

    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.menu-options button:hover {

    background: var(--menu-hover);

    color: var(--titre);
}


/* =========================
   CHAPITRES
========================= */

.chapitres {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap:
        3px
        8px;

    margin-bottom: 34px;
}

.chapitre-lien {

    min-width: 23px;

    padding:
        4px
        5px;

    border: 0;

    background: transparent;

    color: var(--chapitre);

    font-size: 13px;

    line-height: 1.3;

    transition:
        color 0.25s ease;
}

.chapitre-lien:hover {

    color: var(--secondaire);
}

.chapitre-lien.actif {

    color: var(--chapitre-actif);
}


/* =========================
   TITRE DU CHAPITRE
========================= */

h2 {

    margin:
        0
        0
        34px;

    text-align: center;

    color: var(--texte);

    font-size: 46px;

    line-height: 1;

    font-weight: normal;

    letter-spacing: -0.5px;

    transition:
        color 0.35s ease;
}


/* =========================
   TEXTE BIBLIQUE
========================= */

.texte-bible {

    color: var(--texte);

    font-size: 21px;

    line-height: 1.88;

    letter-spacing: 0.01px;

    text-align: justify;

    text-justify: inter-word;

    hyphens: auto;

    transition:
        color 0.35s ease;
}


/* =========================
   VERSETS
========================= */

.verset {

    display: inline;
}


/* =========================
   NUMÉROS DE VERSETS
========================= */

.numero-verset {

    margin-left: 3px;

    margin-right: 3px;

    color: var(--numero-verset);

    font-size: 0.55em;

    line-height: 0;

    font-weight: normal;

    vertical-align: super;

    position: relative;

    top: -0.05em;

    transition:
        color 0.25s ease;
}


/* =========================
   NAVIGATION
========================= */

.navigation {

    display: flex;

    justify-content: space-between;

    margin-top: 66px;

    padding-top: 22px;

    border-top:
        1px solid
        var(--bordure);

    transition:
        border-color 0.35s ease;
}

.navigation button {

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--navigation);

    font-size: 12px;

    line-height: 1.4;

    transition:
        color 0.25s ease;
}

.navigation button:hover:not(:disabled) {

    color: var(--texte);
}

.navigation button:disabled {

    opacity: 0.35;

    cursor: default;
}


/* =========================
   SÉLECTION DU TEXTE
========================= */

::selection {

    background: var(--selection-fond);

    color: var(--selection-texte);
}


/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {

    width: 8px;
}

::-webkit-scrollbar-track {

    background: var(--fond);
}

::-webkit-scrollbar-thumb {

    background:
        rgba(128, 128, 128, 0.25);
}

::-webkit-scrollbar-thumb:hover {

    background:
        rgba(128, 128, 128, 0.40);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .page {

        padding:
            42px
            21px
            76px;
    }


    .header {

        margin-bottom: 45px;
    }


    .header h1 {

        margin-bottom: 32px;

        font-size: 31px;
    }


    .theme-switch {

        top: -4px;

        right: -2px;
    }


    #theme-toggle {

        font-size: 16px;
    }


    #testament-trigger {

        font-size: 14px;
    }


    #livre-trigger {

        font-size: 10px;

        letter-spacing: 3.3px;
    }


    .chapitres {

        gap:
            3px
            6px;

        margin-bottom: 29px;
    }


    .chapitre-lien {

        min-width: 21px;

        font-size: 12px;
    }


    h2 {

        margin-bottom: 29px;

        font-size: 41px;
    }


    .texte-bible {

        font-size: 19px;

        line-height: 1.82;

        text-align: justify;

        text-justify: inter-word;

        hyphens: auto;
    }


    .numero-verset {

        margin-left: 2px;

        margin-right: 2px;

        font-size: 0.53em;
    }


    .navigation {

        margin-top: 52px;

        padding-top: 19px;
    }
}