@import url(https://fonts.googleapis.com/css2?family=Tilt+Neon&display=swap);
/* Factorized and optimized CSS */

/* Remove duplicate display:flex for h1 (already in .accslide) */
h3,
label {
    font-variant: small-caps;
}

/* Factorize .accslide, h1 display:flex */
.accslide,
h1 {
    display: flex;
}

/* Factorize margin-bottom for .cadre, .portrait */
.cadre,
.portrait {
    margin-bottom: 20px;
}

/* Remove unused selectors and redundant rules */
.annule { color: red; }

:root {
    --largeur-colonne: 50px;
    --hauteur-colonne-mobile: 40px;
    --jaune: #e2d451;
    --rouge: #fc5555;
    --orange: #e28b51;
    --rose-clair: #efd2e6;
    --rose: #ef5f99;
    --bleu: #5095e5;
    --blanc: #eee;
    --bleu-fonce: #465196;
}

/* Reset and box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
}

body {
    background: rgba(0, 0, 0, 0.02);
    font-family: "Tilt Neon", sans-serif;
}

ul {
    list-style: none;
}

input {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

label {
    float: left;
    text-align: center;
    align-content: center;
    overflow: hidden;
    transition: background 0.3s;
}

label:hover {
    font-weight: 700;
    cursor: pointer;
    transition-duration: 0;
}

input[type="radio"]:checked ~ label {
    font-weight: 900;
    cursor: default !important;
}

input[type="radio"] ~ label > span {
    background: #fff;
}

.accslide {
    float: left;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.5;
}

.grid-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
}
.grid-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.grid-gallery img:nth-child(4) {
    grid-column: span 2;
}
.grid-gallery img:nth-child(5) {
    grid-row: span 2;
}

.content {
    width: max-content;
}

h1 {
    justify-content: center;
    padding-bottom: 20px;
}

p {
    text-align: justify;
}

h3 {
    font-size: 35px;
    margin: 15px;
}

#prochaineDate {
    display: flex;
    justify-content: space-evenly;
    background-color: #eee;
    border-radius: 20px;
    align-items: stretch;
    text-align: center;
}
#prochaineDate > div {
    padding: 10px;
}

#carte,
#dons,
#portraits {
    display: flex;
    justify-content: space-around;
}
#carte {
    flex-wrap: wrap;
}

img {
    border-radius: 10px;
}

#portraits {
    height: max-content;
    flex-wrap: wrap;
}

.portrait {
    display: inline;
}

.portrait:nth-child(2n) img {
    float: left;
    padding: 0 20px 20px 0;
}
.portrait:nth-child(odd) img {
    float: right;
    padding: 0 0 20px 20px;
}

.last {
    padding-bottom: 40px;
}

.date {
    display: flex;
}
.date div {
    color: #fff;
    padding: 3px 8px;
    margin-right: 8px;
    line-height: 19px;
    border-radius: 4px;
}
.date p {
    line-height: 25px;
}

.collapsible {
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 8px;
    width: 100%;
    border: none;
    text-align: left;
    outline: 0;
    font-size: 16px;
    display: inline-flex;
    justify-content: space-between;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.active,
.collapsible:hover {
    background-color: #ccc;
}
.contenu {
    padding: 15px 22px;
    display: none;
    overflow: hidden;
    background-color: #f5f5f5;
    font-size: 15px;
}
.collapsible:after {
    content: "\02795";
    font-size: 13px;
    color: #fff;
    float: right;
    margin-left: 5px;
}
.active:after {
    content: "\2796";
}

/* Event types */
.concert { background: var(--bleu); }
.animation { background: var(--rouge); }
.theatre { background: var(--jaune); }
.impro { background: var(--orange); }
.danse,
.encoursdeprogrammation { background: #417933; }

em {
    display: inline-block;
    text-align: end;
    width: 125px;
}

.cadre {
    margin-top: 30px;
    position: relative;
    border: 12px solid tan;
    border-top: 12px solid #bda27e;
    border-left: 12px solid #b19876;
    border-bottom: 12px solid #c9ad86;
    box-shadow:
        0 0 6px 5px rgba(58, 18, 13, 0),
        0 0 0 2px #c2a782,
        0 0 0 4px #a58e6f,
        3px 4px 8px 5px rgba(0, 0, 0, 0.5);
    background-image: radial-gradient(
            circle at left 30%,
            rgba(34, 34, 34, 0.3),
            rgba(34, 34, 34, 0.3) 80px,
            rgba(34, 34, 34, 0.5) 100px,
            rgba(51, 51, 51, 0.5) 160px,
            rgba(51, 51, 51, 0.5)
        ),
        linear-gradient(
            215deg,
            transparent,
            transparent 100px,
            #222 260px,
            #222 320px,
            transparent
        ),
        radial-gradient(circle at right, #111, #333);
}

.ardoise {
    padding: 10px 20px;
    color: #fff;
    background-color: #000;
    background-image: linear-gradient(#222 1px, transparent 1px),
        linear-gradient(to right, #222 1px, #000 1px);
    background-size: 20px 20px;
    line-height: 20px;
    height: 100%;
}

.produit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.produit div {
    display: flex;
    align-items: center;
}
.produit img {
    margin-right: 10px;
}

#affiche {
    padding: 25px 20px;
    width: 80%;
    margin: 0 10%;
    height: auto;
}

h4 {
    font-size: 20px;
    margin: 20px 15px;
}
i {
    font-size: 13px;
}

.share {
    background-color: var(--bleu-fonce);
    border: none;
    color: rgb(15, 15, 15);
    padding: 13px 22px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    opacity: 0.75;
    margin: 20px 15%;
    line-height: 20px;
    width: 70%;
}
.share:hover {
    opacity: 1;
}
span.material-symbols-outlined {
    margin-right: 10px;
}

/* Media Queries */
@media only screen and (min-width: 1000px) {
    label {
        width: var(--largeur-colonne);
        height: 100vh;
        font-size: 30px;
        line-height: var(--largeur-colonne);
    }
    input[type="radio"] ~ label > span {
        writing-mode: vertical-rl;
        height: 350px;
    }
    input[type="radio"]:checked ~ label {
        font-size: 35px;
    }
    .accslide {
        width: 0;
        height: 100vh;
        padding: 60px 0;
        transition: 0.7s;
    }
    .cadre,
    .portrait {
        width: calc(100vw - 10 * var(--largeur-colonne));
    }
    .content {
        margin-left: 80px;
        margin-right: 80px;
    }
    .portrait {
        padding: 0 70px;
    }
    /* Factorize background for nav sections */
    #accueil,
    #menus {
        background: conic-gradient(
            var(--orange) 0.25turn,
            var(--rose-clair) 0.25turn 0.5turn,
            var(--rouge) 0.5turn 0.75turn,
            var(--jaune) 0.75turn
        );
        background-size: var(--largeur-colonne) var(--largeur-colonne);
    }
    #nousAider,
    #quiSommesNous {
        background: conic-gradient(
            var(--blanc) 0.25turn,
            var(--rose-clair) 0.25turn 0.5turn,
            var(--bleu) 0.5turn 0.75turn,
            var(--rose) 0.75turn
        );
        background-size: var(--largeur-colonne) var(--largeur-colonne);
    }
    #accessibilite,
    #programmation {
        background: conic-gradient(
            var(--bleu-fonce) 0.25turn,
            var(--rose-clair) 0.25turn 0.5turn,
            var(--rouge) 0.5turn 0.75turn,
            var(--bleu) 0.75turn
        );
        background-size: var(--largeur-colonne) var(--largeur-colonne);
    }
    /* Factorize width calculation for .accslide */
    li {
        /* No direct styles, but keep for specificity */
    }
    li:first-child:nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):last-child input[type="radio"]:checked ~ .accslide {
        width: calc(100% - 2 * var(--largeur-colonne));
    }
    li:first-child:nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):last-child input[type="radio"]:checked ~ .accslide {
        width: calc(100% - 3 * var(--largeur-colonne));
    }
    li:first-child:nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):last-child input[type="radio"]:checked ~ .accslide {
        width: calc(100% - 4 * var(--largeur-colonne));
    }
    li:first-child:nth-last-child(5) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(5):last-child input[type="radio"]:checked ~ .accslide {
        width: calc(100% - 5 * var(--largeur-colonne));
    }
    li:first-child:nth-last-child(6) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(5) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(5):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(6):last-child input[type="radio"]:checked ~ .accslide {
        width: calc(100% - 6 * var(--largeur-colonne));
    }
}

@media only screen and (max-width: 1000px) {
    input[type="radio"] ~ label > span,
    label {
        height: var(--hauteur-colonne-mobile);
    }
    label {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        align-content: space-around;
        width: 100vw;
        font-size: 20px;
    }
    input[type="radio"] ~ label > span {
        background: #fff;
        writing-mode: horizontal-tb;
        line-height: var(--hauteur-colonne-mobile);
        width: 200px;
    }
    input[type="radio"]:checked ~ label {
        font-size: 24px;
    }
    .accslide {
        width: 100%;
        height: 0;
    }
    .content {
        padding: 35px 25px;
    }
    h1 {
        display: none;
    }
    .cadre {
        width: 85vw;
    }
    .date div {
        font-size: 11px;
        padding: 2px 6px;
    }
    #accueil,
    #menus {
        background: conic-gradient(
            var(--jaune) 0.25turn,
            var(--bleu-fonce) 0.25turn 0.5turn,
            var(--rose-clair) 0.5turn 0.75turn,
            var(--rouge) 0.75turn
        );
        background-size: var(--hauteur-colonne-mobile) var(--hauteur-colonne-mobile);
    }
    #nousAider,
    #quiSommesNous {
        background: conic-gradient(
            var(--bleu) 0.25turn,
            var(--blanc) 0.25turn 0.5turn,
            var(--rose-clair) 0.5turn 0.75turn,
            var(--rouge) 0.75turn
        );
        background-size: var(--hauteur-colonne-mobile) var(--hauteur-colonne-mobile);
    }
    #accessibilite,
    #programmation {
        background: conic-gradient(
            var(--rose) 0.25turn,
            var(--orange) 0.25turn 0.5turn,
            var(--rose-clair) 0.5turn 0.75turn,
            var(--bleu) 0.75turn
        );
        background-size: var(--hauteur-colonne-mobile) var(--hauteur-colonne-mobile);
    }
    #prochaineDate {
        flex-direction: column;
    }
    #prochaineDate > div {
        padding: 0px;
        margin: 2px 0px;
    }
    #dons {
        flex-wrap: wrap;
    }
    #affiche {
        width: 100%;
        margin: 0;
    }
    /* Factorize height calculation for .accslide */
    li:first-child:nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):last-child input[type="radio"]:checked ~ .accslide {
        height: calc(100vh - 2 * var(--hauteur-colonne-mobile));
    }
    li:first-child:nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):last-child input[type="radio"]:checked ~ .accslide {
        height: calc(100vh - 3 * var(--hauteur-colonne-mobile));
    }
    li:first-child:nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):last-child input[type="radio"]:checked ~ .accslide {
        height: calc(100vh - 4 * var(--hauteur-colonne-mobile));
    }
    li:first-child:nth-last-child(5) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(5):last-child input[type="radio"]:checked ~ .accslide {
        height: calc(100vh - 5 * var(--hauteur-colonne-mobile));
    }
    li:first-child:nth-last-child(6) input[type="radio"]:checked ~ .accslide,
    li:nth-child(2):nth-last-child(5) input[type="radio"]:checked ~ .accslide,
    li:nth-child(3):nth-last-child(4) input[type="radio"]:checked ~ .accslide,
    li:nth-child(4):nth-last-child(3) input[type="radio"]:checked ~ .accslide,
    li:nth-child(5):nth-last-child(2) input[type="radio"]:checked ~ .accslide,
    li:nth-child(6):last-child input[type="radio"]:checked ~ .accslide {
        height: calc(100vh - 6 * var(--hauteur-colonne-mobile));
    }
}
