/* paramètres généraux                  */
/* gestion modes clair et sombre        */
/*--------------------------------------*/

:root {
    --bg-header-color: #D4B24E; /* original */
    --bg-header-color: #FFD700; /* gold */
    --bg-header-color: #cfb53b; /* old gold */
    --bg-header-color: #c5b358; /* vegas gold */
    --bg-header-color: #d4af37; /* gold metallic*/
    --title-color: white;
    --link-color: black; 
    --link-hover: black;
    --currentday-color : red;
    --currentday-bg : whitesmoke;
    --right-bg-color: rgba( 255, 255, 255, 0.5);
    --footer-font-size: smaller;
    --icone-height: 16px;
    --footer-icone-height: 14px;
    --footer-qrcode-height: 50px;

}

@media (prefers-color-scheme: dark) {
:root {
    --bg-header-color: #DAA520; /* goldenrod*/
    --bg-header-color: #b8860b; /* dark goldenrod*/
    --bg-header-color: #85754e; /* gold fusion*/
    --title-color: dimgrey;
    --link-color: whitesmoke;
    --link-hover: whitesmoke;
    --currentday-color : red;
    --currentday-bg : black;
    --right-bg-color: rgba(0, 0, 0, 0.5);
}
}

/* le reste */
section {
    margin: 5px;
    padding: 0;
}

textarea {
    font-size: medium;
}

a, a:link {
    color: var(--link-color);
}

a:hover {
    color: var(--link-hover);
}

a {
    white-space: normal !important;
} 

.columnright {
    background-size: 30%;
    background: url('/images/christ-roi.png'), linear-gradient(to right, var(--right-bg-color) , var(--right-bg-color) );
    background-blend-mode: overlay;
    background-repeat : no-repeat;
}

.icone, .couleur {
    height: var(--icone-height);
    width: var(--icone-height);
}
.image, .vignette {
    width: calc(100% - 6px);
    margin-top: 3px;
}
.image {
    max-height : 250px;
    object-fit: contain;
}

.zonebouton {
    margin : 0.5em 0em 0em 0em;
}

/* en-tête                                       */
/*-----------------------------------------------*/

header {
    position: relative; 
}
header, .header2 {
    background-color: var(--bg-header-color); 
    border : 2px var(--text-color) solid; 
    padding: 0em 0em 1em 0em;
    border-radius: var(--border-radius);
    text-align : center;
}

header button, .header2 button {
    font-size:medium;
}

header h1, .header2 h1 {
    font-size : xxx-large;
    color : var(--title-color);
    text-shadow:
        -1px 1px 0 var(--text-color),
         1px 1px 0 var(--text-color),
         1px -1px 0 var(--text-color),
        -1px -1px 0 var(--text-color);
}
header h1 {
    padding: 0.5em 0em 0em 0em;
    margin: 0.7em 0em .3em 0em;
}
.header2 {
    margin: 5px 0 0 0;
    padding: 0em 0em 0em 0em;
}

.header2 h1 {
    margin: 0;
    padding: 0em 0em 0em 0em;
}

#buttonleft {
    position: absolute;
    top : 5px;
    left : 5px;
}
#buttonleft img {
    height: 40px;
}
#buttonright {
    position: absolute;
    top : 5px;
    right : 5px;
}
#buttonright img {
    height: 40px;
}

.admin {
    font-weight: bold;
    font-size: larger;
    position: absolute;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    top : 5px;
    text-align : center;
    z-index : 100;
    width: 70%;
}

.avertissements {
    margin: 0.5em 0em 0em 0em;
    border : 1px var(--text-color) solid;
    padding: 0em 1em 0em 1em;
}
.message {
    font-weight: bold;
    font-size:x-large;
    text-align:center;
}
.message span {
    font-weight: normal;
    font-size: medium;
    text-align: center;
    color : red;
    text-decoration : line-through;
}
.message .warning {
    color : red;
    font-weight: bold;
    font-size: x-large;
    text-align: center;
    color : red;
    text-decoration : none;
}
.citation {
    text-align:center;
    font-size: large;
}

/* le corps                                      */
/*-----------------------------------------------*/

/* contenu */
.content2 {
    border : 1px var(--text-color) solid;
    margin: 0.5em 0em 0em 0em;    
}
.content2 table {
    table-layout: fixed;
    width: 100%;
}
.content2 table td {
    width: 50%;
    font-size: 12pt;
    line-height: 12pt;
    padding-left: 5pt;
    margin-bottom: 0pt;
    margin-top: 0pt;
    vertical-align: top;
}
.content2 h2 {
    text-align: center;
    margin-bottom: 0pt;
    margin-top: 2pt;
}

/* les informations */


.limit_lines {  
    overflow: hidden;
    max-height: 7.2em;
    line-height: 1.2em;

    text-overflow: ellipsis;
    display: -webkit-inline-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;

}

/* pour les cadrage gauche et droite sur la même ligne*/
.text_float_reset {
    margin: 0em 0.2em 0em 0.2em;
    clear: both;
    text-align: left;
}
.text_float_right {
   float: right;
}
.text_float_left {
    float: left;
}

/* safari sur iphone et ipad gère les boutons à sa manière...
on essaie ici de contourner en mettant la taille de la police
du bouton à zéro et en ajoutant un span pour la rétablir
*/

.information {
    padding: 0.5em 0em 0em 0em;
}
.information button {
    border : 1px var(--text-color) solid;
    width : 100%;
    font-size : 0;
}
.information button span {
    font-size : medium;
}
.information button p {
    margin: 0em 0.2em 0em 0.2em;
}

#information_titre {
    font-weight: bold;
    text-align : center;
}
#information_texte {
    text-align : left;
}
#information_date {
    font-weight: bold;
    text-align : center;
}
#information_lieu {
    font-style: italic;
    text-align : center;
}

/* les articles */
.article {
    margin: 0.5em 0em 0em 0em;
    border : 1px var(--text-color) solid;
    padding: 0em 1em 0em 1em;
}
.article h2 {
    margin-bottom: 0em;
    margin-top: 0.3em;
    text-shadow:
            -1px 1px 0 var(--bg-color),
             1px 1px 0 var(--bg-color),
             1px -1px 0 var(--bg-color),
            -1px -1px 0 var(--bg-color);

}
.article p {
    font-size: large;
    text-align: right;
    margin-bottom: .5em;
    margin-top: 0em;
}
.article a {
    white-space: nowrap;
}
.article .lieu {
    font-style: italic;
    font-size : smaller;
}
.article .date {
    font-weight: bold;
    font-size : smaller;
}

/* les billets */

/* safari sur iphone et ipad gère les boutons à sa manière...
on essaie ici de contourner en mettant la taille de la police
du bouton à zéro et en ajoutant un span pour la rétablir
*/
.billets {
    margin: 0; 
    padding: 0;
    text-align:justify;
}

.billet {
    margin: 0;
    padding: 0;
    vertical-align: top;
    display: inline;
}
.billet button {
    margin: 5px 0 0px 0;
    border : 1px var(--text-color) solid;
    width : 100%;
    font-size : 0;
}
.billet button span {
    font-size : medium;
}

.billet button p {
    margin: 0.2em 0.2em 0.2em 0.2em;
}

#billet_titre {
    font-weight: bold;
    text-align : center;
}
#billet_texte {
    text-align : left;
}
#billet_date {
    font-weight: bold;
    text-align : center;
}
#billet_lieu {
    font-style: italic;
    text-align : center;
}
/* les actualités diocésaines */
/* safari sur iphone et ipad gère les boutons à sa manière...
on essaie ici de contourner en mettant la taille de la police
du bouton à zéro et en ajoutant un span pour la rétablir
*/
.actualites-wrapper {
    margin: 0; 
    padding: 0;
}
.actualites-wrapper iframe {
    visibility:hidden;
    overflow:hidden;
    height:0;
    width:100%;
    border:none;
}

.actualites {
    margin: 0; 
    padding: 0;
    text-align:justify;
}

.actualite {
    margin: 0;
    padding: 0;
    vertical-align: top;
    display: inline;
}
.actualite button {
    margin: 5px 0 0px 0;
    border : 1px var(--text-color) solid;
    width: 100%;
    font-size : 0;
}
.actualite button span {
    font-size : medium;
}
.actualite button p {
   margin: 0em 0.2em 0em 0.2em;
}

/* pied de page                                  */
/*-----------------------------------------------*/
footer, .footer1 {
    width: 100%;
    text-align: center;
    font-size: var(--footer-font-size);
    margin: 0em 0em 0em 0em;
}
footer button, .footer1 button {
    font-size:medium;
}
footer p, .footer1 p {
    border-top : 1px var(--text-color) solid;
}
footer .icone, .footer1 .icone {
    height: var(--footer-icone-height);
    width: var(--footer-icone-height);
}
.qrcode {
    height : var(--footer-qrcode-height);
    width : var(--footer-qrcode-height);
    float : left;
}

/* à l'écran                                     */
/*-----------------------------------------------*/
@media screen {

    :root {
        --footer-font-size: x-small;
    }
    .currentday {
        color : var(--currentday-color);
        background-color : var(--currentday-bg);
    }

    .footer1, .header2, .content2 {
        display: none;
    }

}

/* taille intermédiaire : 2 colonnes pour les actualités */
/* et on passe l'affichage billets et articles sur 2 colonnes */
@media screen and (min-width: 629px) {
    
    :root {
         --footer-font-size: small;
    }
 
    header h1 {
        padding: 0.5em 0em 0em 0em;
        margin: .6em 0em .2em 0em;
    }
   
    .row {
        display : flex;
        column-gap : 5px;
        column-count : 2;
    }
    .columnleft {
        order: 1;
        width: 310px;
    }
    .columnright {
        order: 2;
        flex: 1; 
    }

    .billet button {
        /* 2 colonnes, séparées d'un intervalle de 5px */
        width : calc(50% - 2.5px);
    }
    .actualite button {
        /* 2 colonnes, séparées d'un intervalle de 5px */
        width : calc(50% - 2.5px);
    }

}

/* grande taille : 3 colonnes pour les actualités */
@media screen and (min-width: 900px) {

    :root {
        --footer-font-size: medium;
    }

    header h1 {
        padding: 0em 0em 0em 0em;
        margin: 0.1em 0em .3em 0em;
    }
    .columnleft {
        width: 400px;
    }

    .billet button {
        /* 3 colonnes, séparées de 5px : on a 10px en deux intervalles */
        width : calc(33.33% - 3.33px);
    }
    
    .actualite button {
        /* 3 colonnes, séparées de 5px : on a 10px en deux intervalles */
        width : calc(33.33% - 3.33px);
    }
    
}

/* à l'impression                                */
/*-----------------------------------------------*/
@media print {

    @page {
        margin: 3mm;
    }

    header, header h1 {
        padding: 0;
        margin: 0;
    }

    /* ce qui est imprimé ou non */
    .avertissements, .actualites-wrapper {
        display: none;
    }
    
    .currentday {
        color : black;
        background-color : white;
    }
    
    .icone {
        display: none;
    }
    
    .noprint {
        display: none;
    }

    .footer1, .header2, .content2 {
        display: block;
    }
    
    :root {
         --footer-font-size: smaller;
    }

    html, body {
        -webkit-print-color-adjust: exact; /* pour chrome sur ios */
        margin: 0;
        width: 100%;
        height: 29.7cm;
    }
    section {
        margin: 0; 
    }

    .columnright {
        background-blend-mode: normal;
    }
    
    .firstpage-content, .secondpage-content {
        height: calc(297mm - 42mm);
        overflow: hidden;

        /* uniquement pour Safari (sans impression du pied de page)*/
        /* sur IOS il est impossible de ne pas imprimer de pied de page*/
        /* avec une hauteur de 205mm c'est bon pour les deux cas */
        @supports (-webkit-touch-callout: none) { 
            height: 205mm;
        }
    }

    .footer1 {
        break-after: page;
        page-break-after: always;
    }
    /* pour Mozilla-Firefox */
    /* ajouter break-before... sinon pas de saut de page !*/
    @-moz-document url-prefix() {
        .header2 {
            break-before: page;
            page-break-before: always;
        }
    }
    
    /* modification presentation pour print */
    a, a:link {
        text-decoration: none;
    }
    
    .article p {
        font-size: 12pt;
        line-height: 12pt;
    }
    .article p .lieu {
        font-size: 10pt;
        line-height: 10pt;
    }

    .article h2 {
        margin-bottom: 0pt;
        margin-top: 5pt;
    }

    .billet button {
        /* 2 colonnes, séparées d'un intervalle de 5px */
        width : calc(50% - 2.5px);
    }

    .dateprint {
        position: absolute;
        top : 5px;
        left : 5px;
        font-size: 8pt;
        line-height: 8pt;

    }

}

@media screen {

    /* pour laisser le footer en bas de page */
    html {
        height: 100%;
        box-sizing: border-box;
    }

    body {
        height: 100%;
    }

    section {
        height: 100%;
    }

    .section-wrapper {
        min-height: 100%;
        display: grid;
        grid-template-rows: auto 1fr auto;
    }
    
    .dateprint {
        display: none;
    }

}
