:root{
    --title-font: futura-pt, sans-serif;
    --content-font: urw-din, sans-serif;
}

*{
    box-sizing: border-box;
    margin: 0;
}

body{
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    background-color: #222126;
    color: #FFFBF5;
    font-family: var(--content-font);
}

h1 {
    color: #FFFBF5;
    text-align: center;
    font-family: var(--title-font);
    font-size: 24px;
    font-weight: 700;
    line-height: 24px; /* 100% */
}

h2 {
    color: #FFFBF5;
    text-align: center;
    font-family: var(--title-font);
    font-size: 24px;
    font-style: normal;
    line-height: 24px; /* 100% */
    text-transform: uppercase;
}

span.subtitle{
    color: #FFF;
    text-align: center;
    font-family: var(--title-font);
    font-size: 16px;
    font-style: normal;
    line-height: normal;
    text-transform: uppercase;
}

time{
    color: #FFF;
    text-align: center;
    font-family: var(--title-font);
    font-size: 40px;
    font-style: normal;
    line-height: normal;
}

.wrapper {
    max-width: 1512px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.wrapper.column{
    flex-direction: column;
}

.side, .name-container{
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    flex-shrink: 0;
    flex-wrap: wrap;

    overflow: hidden;
}

.side {
    width: 50vw;
    max-width: 50%;
    aspect-ratio: 1 / 1;
}

.cube {
    position: relative;
    width: 33.3334%;
    height: calc(100vw / 6);
    max-width: 252px;
    max-height: 252px;
    min-width: 50px;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    display: flex;
    padding: 0px 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;

    transition: background-image 1.5s ease-in-out, opacity 0.5s ease-in-out;
    will-change: background-image, opacity;
}

.cube img{
    width: 100%;
    height: auto;
}

.cube figcaption{
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    visibility: hidden;
}

.no-gap{
    gap:0;
}

/* Appliquer les images de fond depuis data-bg */
.cube.cube--decorative[data-bg] {
    background-image: attr(data-bg url); /* Appliquer l'image */
}

.name-container{
    width: 66.6666%;
    height: calc(100vw / 6 * 2);
    max-width: 504px;
    max-height: 504px;
    aspect-ratio: 1 / 1;
}

.name-container .cube{
    width: 50%!important;
    max-width: 50%;
}

.cube--tall{
    height: calc(100vw / 6 * 2);
    max-height: 504px;
    aspect-ratio: 1 / 2;
}

.cube--wide{
    width: 66.6666%;
    max-width: 504px;
    aspect-ratio: 2 / 1;
}

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

section.plain{
    display: flex;
    padding: 128px 32px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    align-self: stretch;

    background: linear-gradient(180deg, #1A191E 0%, #222126 100%);
}

section.plain h2{
    margin-bottom: 24px;
    max-width: 560px;
}

section.plain p{
    max-width: 560px;
}

.scroll-chevron {
    visibility: hidden;
    position: absolute; /* Position relative au cube */
    top: 50%; /* Décalé de 10px par rapport au bas du cube */
    left: 50%; /* Centré horizontalement */
    transform: translateX(-24px), translateY(-24px); /* Ajustement pour le centrer */
    width: 48px; /* Taille du chevron */
    height: 48px;
    animation: bounce 2s infinite ease-in-out; /* Animation du rebond */
}

.scroll-chevron svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Animation de haut en bas */
@keyframes bounce {
    0%, 100% {
        transform: translate(-50%, 0); /* Position initiale */
    }
    50% {
        transform: translate(-50%, 10px); /* Déplacement vers le bas */
    }
}

.prefooter{
    display: flex;
    height: calc(1512px / 12);
    max-height: 63px;
    max-width: 1512px;
    align-items: flex-start;
    flex-shrink: 0;
    align-self: stretch;
}

.prefooter .cube{
    width: calc(100vw / 12)!important;
    height: calc(100vw / 12)!important;
    max-width: 63px!important;
    max-height: 63px!important;
}

.flex-cube{
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 0 0;
}

footer{
    display: flex;
    height: 63px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    align-self: stretch;
    background: #d99c50;
}

header.header{
    display: flex;
    width: 100%;
    height: 172px;
    align-items: flex-start;
    align-content: flex-start;
    flex-shrink: 0;
    flex-wrap: wrap;
}

header.header .name-container{
    width: 172px;
    height: 172px;
}

header.header .cube {
    width: 86px;
    height: 86px;
    max-width: 86px;
    max-height: 86px;
    flex-shrink: 0;
    align-self: stretch;
}

.title-container{
    display: flex;
    width: calc(100% - 172px);
    height: 172px;
    align-items: flex-start;
    align-content: flex-start;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.title-container .cube--bar{
    display: block;
    width: calc(100% - 86px);
    height: 86px;
}

.title-container .title--bar{
    display: flex;
    width: calc(100% - 86px);
    height: 86px;
    padding: 0px 32px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex-shrink: 0;
}

.cube--decorative.cube--bar{
    background-size: 86px 86px;
    background-repeat: repeat;
    background-position: center;
    transition: background-image 1.5s ease-in-out, opacity 0.5s ease-in-out;
    will-change: background-image, opacity;
}

.title-container h2{
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-line-clamp: 1;
    align-self: stretch;

    color: #FFF;
    font-family: var(--title-font);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px; /* 100% */
    text-overflow: ellipsis;
}

.content-line{
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-shrink: 0;
}

.content-line .cube.cube--tall{
    width: 172px;
    height: 344px;
}

section.content{
    display: flex;
    width: calc(100% - 258px);height: 504px;
    flex-direction: row;
    align-items: flex-start;
    align-content: flex-start;
    flex-shrink: 0;
    flex-wrap: wrap;
    margin-left: 86px;
}

.content-plain{
    padding: 0;
    color: var(--false-black);
    background-color: var(--false-white);
}

.content-plain p {
    margin: 16px;
}

ul.categories{
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    text-transform: uppercase;
    cursor: pointer;
}

ul.categories li {
    display: flex;
    width: 172px;
    height: 172px;
    padding: 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;

    border: 1px solid #000;
    background: url(img/4.webp) lightgray 50% / cover no-repeat;

    color: #222126;
    text-align: center;
    font-family: var(--title-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px; /* 100% */
}

.side.action{
    display: flex;
    padding: 32px 32px 51px 32px;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    height: 100%;
    background: linear-gradient(180deg, #DCAE75 0%, #917759 100%);
    aspect-ratio: auto!important;
}

.side.overview{
    display: flex;
    padding: 32px 32px 51px 32px;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1 0 0;
    align-self: stretch;
    height: 100%;
    background: linear-gradient(180deg, rgba(220, 174, 117, 0.20) 0%, rgba(145, 119, 89, 0.20) 100%);
    aspect-ratio: auto!important;
}

ul.proposals{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;

    padding: 0;
}

ul.proposals li{
    display: flex;
    width: 400px;
    max-width: 100%;
    padding: 8px 8px 8px 16px;
    justify-content: space-between;
    align-items: center;

    background-color: #FFFBF5;
    color: #222126;
}

form{
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1 0 0;
    align-self: stretch;
}

.form-group{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

input, textarea{
    display: flex;
    width: 100%;
    padding: 8px 16px;
    align-items: flex-start;
    gap: 8px;

    background-color: #FFFBF5;
    border: 1px solid #66451c;
    color: #222126;
    text-align: left;
    font-family: var(--content-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

textarea{
    height: 100px;
}

.button{
    display: flex;
    width: 100%;
    padding: 16px;
    align-items: center;
    justify-content: center;
    gap: auto;

    background-color: #222126;
    color: #FFFBF5;
    text-align: center;
    font-family: var(--content-font);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

.link{
    display: flex;
    width: 100%;
    padding: 0 0 0 40px;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;

    color: #FFF;
    font-family: var(--title-font);
    font-size: 40px;
    font-weight: 700;
    text-transform: uppercase;

    cursor: pointer;
}

.cursor{
    cursor:pointer;
}

#voteOptions li{
    display: flex;
    height: 110px;
    width: 100%;
    padding: 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    align-self: stretch;
    cursor: pointer;

    color: #222126;

    text-align: center;
    font-family: var(--title-font);
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px; /* 100% */

    border: 1px solid #000;
    background: url('img/4.webp') lightgray 0% 0% / 110px 110px repeat;
}

#voteOptions li.disabled{
    opacity: 0.5;
}

@media screen and (max-width: 800px), screen and (max-width: 800px), screen and (max-width: 1024px) and (min-height: 800px) {
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .subtitle{
        font-size: 14px;
    }
    
    time{
        font-size: 32px;
    }
    
    .wrapper {
        max-width: 1512px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .side{
        width: 100%;
        height: 100vw;
        max-width: none;
    }

    .cube{
        width: 33.3333vw;
        height: 33.3333vw;
        max-width: none;
        max-height: none;
    }

    .cube--tall{
        height: 66.6666vw;
    }

    .cube--wide{
        width: 66.6666vw;
    }

    .name-container{
        width: 66.6666vw;
        height: 66.6666vw;
        max-width: none;
    }
}

@media screen and (max-width: 800px){
    h2{
        text-align: left;
    }
    .hide-if-responsive{
        display: none!important;
        width: 1px;
        height: 1px;
        margin: -1px;
    }

    .fill-if-responsive{
        flex: 1 0 0!important;
        max-width: none;
    }

    header .name-container{
        width: 100%!important;
        height: 86px!important;
    }

    .scroll-chevron{
        visibility: visible;
    }

    .content{
        width: 100%!important;
        height: auto;
        margin-left: 0!important;
    }

    header.header .cube.fill-if-responsive{
        max-width: none;
        background-size: 86px 86px;
        background-repeat: repeat;
        background-position: top left;
    }

    .title-container{
        width: 100%!important;
        max-width: none;
    }

    .title-bar{
        width: calc(100vw - 86px);
        max-width: none;
    }

    .content-line{
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .content ul.categories li{
        width: 50vw;
        height: 50vw;
    }

    section.content{
        width: 100%!important;
        flex-direction: column!important;
        flex-wrap: wrap;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .side.action, .side.overview {
        height: auto;
        aspect-ratio: auto!important; 
        flex: 1 0 auto;
    }

    .link{
        padding: 0 0 0 24px;
    }
}

@media screen and (max-width: 350px){
    .content ul.categories li{
        width: 100vw;
        height: 100vw;
    }
}