
html, body, header, section, div, table, tr, td {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    background-color: #FEFEFE;
    box-sizing: border-box;
}
div, table, tr, td {
    background-color: #FFF;
}
p, h1, h2, h3, h4 {
    box-sizing: border-box;
}

/* Bandeau du haut */

header {
    background-color: #000;
    color: #FFF;
    padding: 6px 12px 8px 12px;
    margin: 0 auto;
    max-width: 500px;
    position: sticky;
    top: 0;
    border-bottom: 4px solid #e20020;
    text-align: left;
    z-index: 9999;
 }

header nav {
    text-align: right;
}

header nav a {
    padding: 0 0.5rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    vertical-align: center;
}
header nav a#navLang {
    vertical-align: bottom;
}

header nav a:first-child {
    position: absolute;
    padding: 0;
    left: 5px;
}

header a > img {
    height: 1.5rem;
    vertical-align: middle;
}

header a:first-child > img {
    height: 1rem;
}

h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Zone titre du site */

#site {
    margin: 0 auto;
    padding: 2px 0 6px 0;
    text-align: center;
    font-size: 20px;
    line-height: 20px;
    height: 28px;
    background-color: #E20020;
    color: white;
    max-width: 500px;
    cursor: pointer;
}


/* Pour toutes les sections... */

#agenda, #detail, #infos, #langsel, #filters {
    display: none;
}


/* Partie listing agenda */


#agenda {
    padding: 0 0.5rem 1.5rem 0.5rem;
}

#agenda div.date {
    margin: 2.5rem auto 0 auto;
    text-align: center;
    max-width: 500px;
    background-color: transparent;
    color: #000;
    text-shadow: 0 0 5px #FFF;
}

#agenda div.date span {
    text-align: right;
}

#agenda > div.event {
    margin: 1.2rem auto 0 auto;
    box-shadow: 0 0 1.5rem #999;
    overflow: hidden;
    max-width: 500px;
    cursor: pointer;
}

#agenda div {
    scroll-margin-top: 60px;
    overflow: initial !important;
}

#agenda > div table {
    width: 100%;
    padding: 0;
    border-collapse: collapse;
}

#agenda > div tr {
    padding: 0;
}
#agenda > div td {
    vertical-align: top;
    text-align: left;
}

#agenda > div td:nth-child(1) {
    width: 20ch;
}

#agenda > div td:nth-child(2) {

}

#agenda > div td.desc {
    padding: 0 0.4rem 0.33rem 0.33rem;
    height: 11.25ch;
    max-height: 11.25ch;
    overflow: hidden;
}

#agenda > div table img {
    display: block;
}

#agenda > div h3 {
    color: #000;
    font-size: min(3.8vw, 1.3rem);
    margin: 0.33rem 0.33rem 0.2rem 0.33rem;
}

#agenda > div h4 {
    color: #AAA;
    margin: 0.2rem 0 0.33rem 0.33rem;
}

#agenda > div p {
    margin: auto;
    font-size: min(3vw, 1rem);
}

#agenda div.event td > img {
    width: 20ch; /*100%;*/
    height: 11.25ch;
    aspect-ratio: 16/9;
    object-fit: cover;
}

#agenda .date h2 img {
    width: 1.5rem;
    aspect-ratio: 1;
    cursor: pointer;
    vertical-align: top;
    padding-left: 1rem;
}

/* Etiquettes sous le titre */

#agenda h4 span {
    font-size: min(2.5vw, 1rem);
    display: inline-block;
    margin: 1px 0.33em 1px 0;
    padding: 1px 0.5rem;
    background-color: #E0E0E0;
    color: #000;
    font-weight: normal;
    border-radius: 1rem;
}

#agenda h4 span.green {
    background-color: #4B8;
    color: #FFF;
}
#agenda h4 span.blue {
    background-color: #48C;
    color: #FFF;
}
#agenda h4 span.loc {
    background-color: #444;
    color: #fff;
}
#agenda h4 span.h {
    color: #000;
    background-color: #FFF;
    padding-left: 0;
    padding-right: 0;
    font-weight: normal;
}

#agenda h4 span img {
    display: inline-block;
    width: min(2.2vw, 0.9rem);
    aspect-ratio: 1;
    vertical-align: text-top;
    padding: 1px 4px 0 0;
}

/* Etiquettes bas de listing */

#agenda tr.botrow, #agenda tr.botrow td {
    padding: 1px;
    line-height: 100%;
}

#agenda .botrow span {
    font-size: min(2.5vw, 1rem);
    display: inline-block;
    margin: 1px;
    padding: 1px 0.5rem;
    background-color: #E0E0E0;
    color: #000;
    font-weight: normal;
}

/* Calendrier */

#datesel {
    max-width: 500px;
    margin: auto;
}
#datesel span.nm1, #datesel span.nm2 {
    height: 1.6rem;
    line-height: 1.6rem;
    border-radius: 0.8rem;
    display: inline-block;
    margin: 5px 10px 12px 10px;
    padding: 0 1rem;
    vertical-align: middle;
    font-size: 1rem;
    text-transform: capitalize;
    font-weight: bold;
}
#datesel span.nm1 {
    color: #4B8;
}
#datesel span.nm2 {
    color: #48C;
}

#calendar {
    padding: 0.5rem 0;
}
#calendar p {
    text-align: center;
    margin: 0 auto;
}
#calendar p span {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1.33rem;
    background-color: #FAFAFA;
    color: #444;
    display: inline-block;
    margin: 5px;
    line-height: 2.5rem;
    vertical-align: middle;
    font-size: 1rem;
}
#calendar p span.m1 {
    background-color: #4B8;
    color: #296;
}
#calendar p span.m2 {
    background-color: #48C;
    color: #076;
}
#calendar p span.off {
    background-color: #EEE;
    color: #AAA;
}
#calendar p span.on {
    cursor: pointer;
    color: #FFF;
    font-weight: bold;
}
#calendar p span.on:hover {
    background-color: #e20020;
    color: #fff;
}
#calendar p:first-child span {
    background-color: #000;
    color: #FFF;
    font-weight: bold;
}

/* Liens boutons */

a.button {
    display: inline-block;
    background-color: #fff;
    color: #e20020;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem auto;
    text-decoration: none;
    box-shadow: 0 0 0.8rem #CCC;
    cursor: pointer;
    line-height: 1.33rem;
}

a.button.on, a.button:hover {
    background-color: #e20020;
    color: #fff;
    box-shadow: none;
}

a.button.on span::before  {
    content: '✔ ';
    font-weight: bold;
    color: #FFF;
}

a.button.grey {
    background-color: #444; /*#4B8;*/
    color: #FFF;
    box-shadow: none;
}
a.button.grey:hover {
    background-color: #000;
}

a.button.back {
    background-color: #FFF;
    color: #E20020;
    position: absolute;
    top: -27px;
    margin-left: 16px;
    padding: 0.5rem;
    z-index: 999;
    border-radius: 100%;
}

hr {
    border: none;
    border-top: 1px dashed #e20020;
    width: 70vw;
    max-width: 500px;
    margin: 1.5rem auto;
}

/* Pied de page */

#footer {
    padding: 0.6rem;
    position: page;
    bottom: 0;
    background-color: #FFF;
    max-width: 500px;
    margin: 1.5rem auto 0 auto;
}
#footer a {
    text-decoration: none;
    color: #E20020;
}
#footer a:hover {
    color: #000;
}

/* Affichage des erreurs et infos*/

div.error, div.info {
    margin: 3rem auto 1rem auto;
    width: 80%;
    max-width: 400px;
    background: #FFE;
    border: thin solid #000;
    border-radius: 7px;
    padding: 1.5rem 1rem;
}
div.info {
    width: 80%;
    max-width: 400px;
    background: #FFF;
    border: none;
    padding: 1.5rem 1rem;
}
div.error h2, div.info h2 {
    margin: 0 auto 1.5rem auto;
    color: #E20020;
}
div.info h2 {
    color: #000;
}

div.error p, div.info p {
    font-style: italic;
}

/* Fiches individuelles */

#detail {
    position: relative;
}
#detail > img.headimg {
    width: 100%;
    max-width: 500px;
    margin: 0;
    padding: 0;
    aspect-ratio: 16/9;
    object-fit: cover;
}

#detail h2 {
    margin: 1rem auto 1rem auto;
    padding: 0 0.5rem;
    width: 100%;
    max-width: 500px;
}

#detail h3 {
    margin: 1.33rem auto 0.25rem auto;
    padding: 0 12px 3px 12px;
    width: 100%;
    max-width: 500px;
    text-align: left;
    color: #000;
}

#detail p {
    text-align: justify;
    width: 100%;
    max-width: 500px;
    padding: 0.25rem 12px 0.33rem 12px;
    margin: 0.5rem auto;
    font-family: serif;
    font-size: min(4vw, 1.2rem);
    color: #777;
}