/* ----------------------------- */
/* ---------- GENERAL ---------- */
/* ----------------------------- */

:root {
    --main-color: #e2001a;
    --body-bg: #fcfcfc;
    --topbar-bg: #fff;
    --sommaire-bg: #ccd5dd;
    --sommaire-h2-color: #000;
}

body {
    overflow: hidden;
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
    font-family: 'Source Sans Pro', sans-serif;
}

.hidden {
    display: none;
}

/* ------------------------------ */
/* ---------- FLIPBOOK ---------- */
/* ------------------------------ */

#flipbook {
    position: relative;
    height: calc(100vh - 70px);
}

#flipbook .magazine {
    cursor: zoom-in;
}

#flipbook .magazine.zoom-in {
    cursor: zoom-out;
}

#flipbook .magazine-viewport {
    width: 100% !important;
    height: 100% !important;
}

@media only screen and (max-width: 800px) {
    #flipbook {
        height: calc(100vh - 175px);
    }
}

/* ---------------------------- */
/* ---------- TOPBAR ---------- */
/* ---------------------------- */

#topbar {
    height: 70px;
    background: var(--topbar-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 9999999;
}

#topbar .logo {
    display: flex;
    align-items: center;
}

#topbar .logo img {
    height: 40px;
}

#topbar .logo h1 {
    margin-left: 50px;
    font-size: clamp(1.125rem, 0.717rem + 0.652vw, 1.5rem);
    color: var(--main-color);
}

#topbar .actions-btn {
    display: flex;
    margin-left: auto;
}

#topbar .actions-btn button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--main-color);
    border-radius: 50%;
    margin-left: 10px;
    text-align: center;
    line-height: 30px;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.15s;
}

#topbar .actions-btn button:hover {
    opacity: 0.75;
}

#topbar .actions-btn button i {
    font-size: 14px;
}

@media only screen and (max-width: 800px) {
    #topbar {
        height: auto;
        padding: 10px;
    }

    #topbar .logo h1 {
        display: none;
    }
}

/* ----------------------------- */
/* ---------- CONTENT ---------- */
/* ----------------------------- */
.content {
    display: grid;
    grid-template-columns: 300px 1fr;
    transition: 0.3s;
}

@media only screen and (max-width: 1660px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------ */
/* ---------- SOMMAIRE ---------- */
/* ------------------------------ */

#sommaire {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--sommaire-bg);
    overflow-y: auto;
    padding-inline: 10px;
    transform: translateX(-300px);
    transition: 0.3s;
}

#sommaire.active {
    transform: translateX(0);
}

#sommaire h2 {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--sommaire-h2-color);
    font-weight: 600;
    margin-top: 30px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
}

#sommaire a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-decoration: none;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    color: white;
    transition: 0.3s;
}

@media only screen and (max-width: 1660px) {
    #sommaire {
        position: fixed;
        top: 70px;
        left: 0;
        z-index: 99999;
    }
}

#sommaire::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
#sommaire::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}
#sommaire::-webkit-scrollbar-thumb {
    background-color: #888;
}
#sommaire::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* -------------------------------- */
/* ---------- PAGINATION ---------- */
/* -------------------------------- */

#pagination {
    margin-inline: auto;
    color: #000;
    font-size: 14px;
    background: white;
    padding: 6px 22px;
    border-radius: 64px;
}

#pagination span {
    font-weight: bold;
}

#pagination .current-page {
    margin-inline: 3px;
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 20px;
    width: 60px;
    text-align: center;
    padding: 5px 10px;
}

@media only screen and (max-width: 800px) {
    #pagination {
        display: none;
    }
}

/* ------------------------------ */
/* ---------- PARTAGES ---------- */
/* ------------------------------ */

#partages {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    pointer-events: none;
    transition: 0.3s;
    opacity: 0;
}

#partages .partages-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin: auto;
    color: white;
}

#partages .partages-container a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: 0.15s ease-in-out;
}

#partages .partages-container a:hover {
    scale: 1.1;
}

#partages .partages-container a svg {
    width: 50px;
    height: 50px;
}

#partages-cross {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ----------------------------- */
/* ---------- REGIONS ---------- */
/* ----------------------------- */

#flipbook .magazine .region {
    background: var(--main-color);
}
