/*
 * Metal Horreur : habillage « Zombie Apocalypse » pour Learn2.
 * Couleurs, polices et images reprises du thème WordPress Zombie Apocalypse 2.1.0
 * de Cryout Creations (GPLv2) : http://www.cryoutcreations.eu/wordpress-themes/zombie-apocalypse
 * Les images se trouvent dans ../images/zombie/.
 * Ce fichier est chargé par partials/base.html.twig après css-compiled/theme.css.
 */

:root {
    --zombie-red: #99090A;
    --zombie-blood: #8B2001;
    --zombie-pink: #caa;
    --zombie-paper: #f2f2f2;
    --zombie-text: #333;
}

/* ---------- Fond général ---------- */

html, body {
    background: #000 url(../images/zombie/back.jpg) repeat fixed;
}

body {
    font-family: Verdana, Geneva, sans-serif;
    color: var(--zombie-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: Verdana, Geneva, sans-serif;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: none;
}

a {
    color: var(--zombie-red);
}

a:hover {
    color: #000;
}

/* ---------- Barre latérale ---------- */

#sidebar {
    background: #0b0303 url(../images/zombie/topper.jpg) center top repeat-y;
    border-right: 1px solid #2a0505;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
}

#header {
    background: transparent url(../images/zombie/hand.png) right -1rem bottom -10px no-repeat;
    background-size: auto 150px;
    padding-top: 2rem;
    min-height: 170px;
}

#header a#site-title {
    display: block;
    margin: 0 0 1.5rem;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 1.7rem;
    font-weight: bold;
    line-height: 1.2;
    color: #ccc;
    text-shadow: var(--zombie-blood) 3px 3px 10px;
}

#header a#site-title:hover {
    color: #fff;
}

.searchbox {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid #3a0a0a;
    border-radius: 4px;
    width: 80%;
}

.searchbox input {
    color: #ccc;
}

.searchbox label, .searchbox span {
    color: #999;
}

#sidebar a {
    color: #c43c3c;
}

#sidebar a:hover {
    color: #fff;
}

#sidebar ul.topics > li > a {
    font-weight: bold;
}

#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
    background: rgba(0, 0, 0, 0.45);
}

#sidebar ul li.active > a {
    background: var(--zombie-red);
    color: #000 !important;
}

#sidebar ul li.visited > a .read-icon {
    color: #c43c3c;
}

#sidebar hr {
    border-bottom: 1px solid #3a0a0a;
}

/* Impacts de balles en bas de la barre latérale */
#footer {
    background: url(../images/zombie/shoot.jpg) center top no-repeat;
    padding-top: 55px;
}

#footer, #footer p {
    color: #777;
}

/* ---------- Zone de contenu : feuille de papier tachée de sang ---------- */

#body .padding {
    position: relative;
    margin: 2rem 2.5rem 3rem;
    padding-bottom: 110px;
    background:
        /* Coulures de sang fixes : alignées sur le coin haut droit de la feuille (marges 2rem / 2.5rem) */
        url(../images/zombie/widget.jpg) right calc(2.5rem - 5px) top calc(2rem - 4px) no-repeat fixed,
        url(../images/zombie/main_bottom.jpg) left bottom / 100% 100px no-repeat,
        /* Texture du papier fixe : ses bords sombres sont remplacés par l'ombre intérieure */
        url(../images/zombie/main_center.jpg) center top / 100% auto repeat-y fixed,
        var(--zombie-paper);
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.9), inset 0 0 18px rgba(0, 0, 0, 0.55);
}

/* Bande noire fixe en haut : la feuille défile dessous */
#body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 300px;
    right: 0;
    height: 2rem;
    background: #000 url(../images/zombie/back.jpg) repeat fixed;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

#top-bar {
    background: rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--zombie-pink);
    border-radius: 0;
    margin-right: 90px;
}

#body-inner {
    color: var(--zombie-text);
    font-size: 16px;
    line-height: 1.6;
    padding-right: 60px;
}

#body-inner h1,
#body-inner h2,
#body-inner h3,
#body-inner h4,
#body-inner h5,
#body-inner h6,
#chapter h1,
#chapter h3 {
    color: #000;
    text-align: left;
    padding-left: 10px;
    border-left: 4px solid var(--zombie-pink);
}

#body-inner h1 {
    color: var(--zombie-red);
}

#body h1 + hr {
    border-bottom: 2px solid var(--zombie-pink);
}

#body a {
    color: var(--zombie-red);
}

#body a:hover {
    color: #000;
    text-decoration: underline;
}

#body-inner ul {
    list-style: none;
}

#body-inner ul li {
    padding-left: 14px;
    background: url(../images/zombie/bullet.gif) 0 9px no-repeat;
}

#chapter p {
    color: var(--zombie-text);
}

blockquote {
    border-left: 4px solid var(--zombie-red);
    background: rgba(153, 9, 10, 0.05);
}

code {
    background: #fff;
    border: 1px solid #ddd;
    color: var(--zombie-red);
}

/* Images des galeries : cadre photo façon légende du thème */
#body img {
    background: #f5f5f5;
    border: 1px solid #ccc;
    padding: 6px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

#body a:hover img {
    border-color: var(--zombie-red);
}

/* Lecteurs PeerTube */
.grav-peertube-wrapper {
    border: 6px solid #f5f5f5;
    outline: 1px solid #ccc;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin: 1rem 0 2rem;
}

/* Flèches de navigation (hors de la feuille, sur le fond sombre) */
#body .nav {
    color: #5a1010;
    background: transparent;
}

#body .nav:hover {
    background: rgba(153, 9, 10, 0.15);
    color: #c43c3c;
}

#sidebar-toggle {
    color: var(--zombie-red);
}

/* ---------- Écrans étroits ---------- */

@media only all and (max-width: 59.938em) {
    #body .padding {
        margin: 1rem;
        background-position: right calc(1rem - 5px) top calc(1rem - 4px), left bottom, center top, 0 0;
    }

    #body::before {
        left: 230px;
        height: 1rem;
    }

    #body-inner {
        padding-right: 40px;
    }
}

@media only all and (max-width: 47.938em) {
    #body .padding {
        margin: 0.5rem;
        padding-bottom: 80px;
        background-size: 60px auto, 100% 80px, 100% auto, auto;
        background-position: right calc(0.5rem - 5px) top calc(0.5rem - 4px), left bottom, center top, 0 0;
    }

    #body::before {
        left: 0;
        height: 0.5rem;
    }

    #body-inner {
        padding-right: 0;
    }

    #top-bar {
        margin-right: 40px;
    }
}

/* ---------- Page de résultats de recherche (plugin simplesearch) ---------- */

.simplesearch .search-wrapper {
    margin: 0 0 1rem;
}

.simplesearch .search-wrapper .search-input {
    width: 100%;
    max-width: 480px;
    padding: 0.5rem 0.8rem;
    background: #fff;
    border: 1px solid #ccc;
    border-left: 4px solid var(--zombie-red);
    border-radius: 0;
    color: var(--zombie-text);
    font-size: 16px;
}

.simplesearch .search-wrapper .search-input:focus {
    outline: none;
    border-color: var(--zombie-red);
    box-shadow: 0 0 6px rgba(153, 9, 10, 0.4);
}

.simplesearch .search-summary {
    color: #666;
    margin-bottom: 2rem;
}

.simplesearch .search-summary strong {
    color: var(--zombie-red);
}

.simplesearch .search-row {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--zombie-pink);
}

.simplesearch .search-row:last-child {
    border-bottom: none;
}

.simplesearch .search-image {
    flex: 0 0 160px;
}

#body .simplesearch .search-image img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    margin: 0;
}

.simplesearch .search-item {
    margin: 0;
    flex: 1;
    min-width: 0;
}

#body-inner.simplesearch h3.search-title {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    line-height: 1.4;
}

.simplesearch .search-details {
    font-size: 13px;
    color: #888;
    margin-bottom: 0.4rem;
}

.simplesearch .search-item p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

@media only all and (max-width: 47.938em) {
    .simplesearch .search-row {
        flex-direction: column;
    }

    .simplesearch .search-image {
        flex-basis: auto;
    }
}
