/*  -------------------------------  */
/* |            GENERAL            | */
/*  -------------------------------  */

@font-face { 
    font-family: 'Lora'; 
    src: url('Lora-Regular.ttf'); 
}
@font-face { 
    font-family: 'Lora'; 
    font-style: italic;
    src: url('Lora-Italic.ttf'); 
}
@font-face { 
    font-family: 'Lora'; 
    font-weight: bold;
    src: url('Lora-Bold.ttf'); 
}

@font-face { 
    font-family: 'Noto'; 
    src: url('NotoEmoji-Regular.ttf'); 
}
@font-face { 
    font-family: 'Noto'; 
    font-weight: bold;
    src: url('NotoEmoji-Medium.ttf'); 
}

:root, ::backdrop {
    /* --- propriétés générales --- */
    --transitionTemps: 0.2s;
    --transitionFunction: initial;
    --fontSizeBase: 11pt;
    --pageWidth: 600px;
    --blocRadius: 0.5rem;
    
    /* --- couleurs générales --- */
    --couleurBlanc: 255,255,255;
    --couleurNoir: 0,0,0;
    --couleurGrisFonce: 30,30,30;
    --couleurGrisClair: 225, 225, 225;
    --couleurRougeFonce: 123, 0, 0;
    
    /* --- le design --- */
    --couleurFond: var(--couleurBlanc);                          
    --couleurDominante: var(--couleurNoir);        
    --couleurSecondaire: 245, 228, 196; 
    
    --couleurTexte: var(--couleurNoir);        
    --couleurLien: var(--couleurNoir);    
    --couleurFondLien: var(--couleurNoir);    
    --couleurMenu: var(--couleurSecondaire);    
    --couleurPied: var(--couleurSecondaire);  
    --couleurSupprimer: 255, 197, 197;
}

* { box-sizing: border-box; }

html { 
    background-color: rgb(var(--couleurFond));
    
    margin: 0; 
    padding: 0; 

    /* general font info */
    font-size: var(--fontSizeBase);
    color: rgb(var(--couleurTexte));
    font-family: 'Lora', serif;
}

body {
    margin: 0; 
    padding: 0;
}

.bloc-secondaire { 
    background: rgba(var(--couleurSecondaire), 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--blocRadius);
    border: 1px solid rgba(var(--couleurSecondaire), 1);
}

/*  -------------------------------  */
/* |       LIENS ET SYMBOLES       | */
/*  -------------------------------  */

a {
/*    text-decoration: underline; */
    text-decoration: none; 
    font-weight: bold;
    color: rgb(var(--couleurLien)); 
}
a:hover, .lien:hover { background: rgba(var(--couleurFondLien),0.1); }
a[target="_blank"]::after, .lien--externe::after { 
    content: '🔗'; 
    font-family: 'Noto';
    display: inline-block;
    margin-left: 0.25rem;
}

.symbole { font-family: 'Noto'; text-decoration: none;  }
.symbole--editer { 
    display: inline-block; 
    margin: 0.25em; 
    font-size: 0.75em; 
    vertical-align: top; 
    color: rgba(var(--couleurRougeFonce),1); 
}
.symbole--editer:hover { }


/*  -------------------------------  */
/* |          FORMULAIRES          | */
/*  -------------------------------  */

form { margin: 0; }
textarea { resize: vertical; }

.bouton, .champ-texte, .champ-televerser::file-selector-button { 
    margin: 0 0.5rem; 
    padding: 0.5rem;
    font-size: inherit; 
    font-family: inherit;
    border-radius: var(--blocRadius);
}
.bouton + .bouton, .champ-texte + .bouton { margin-left: 0; }

.bouton, .champ-televerser::file-selector-button { 
    color: rgba(var(--couleurFont));
    background: rgba(var(--couleurSecondaire));
    border: 0px outset rgba(var(--couleurSecondaire));
    border-bottom-width: 1px;
    cursor: pointer;
}
.bouton:hover, .champ-televerser::file-selector-button:hover { border-color: rgba(var(--couleurNoir)); }
.bouton:active, .champ-televerser::file-selector-button:active { border: 1px inset rgba(var(--couleurSecondaire));  }

.champ-texte { 
    background: rgba(var(--couleurSecondaire), 0.2);
    border: 0;
    border-bottom: 1px solid rgba(var(--couleurSecondaire), 1);
}
.champ-texte:focus, .champ-texte:focus-visible { 
    outline: 0; 
    border-bottom-color: rgba(var(--couleurNoir), 0.5); 
    background: rgba(var(--couleurSecondaire), 0.5);
}
.champ-texte::placeholder { font-style: italic; color: rgba(var(--couleurTexte), 0.5); }

.champ-televerser { font-family: inherit; font-style: italic; }

/*  -------------------------------  */
/* |            MESSAGE            | */
/*  -------------------------------  */
.message { 
    border: 0; 
    border-radius: var(--blocRadius);
    padding: 1rem; 
    max-width: calc(var(--pageWidth) - 100px);
    box-shadow: 0 0 10px -5px rgba(var(--couleurNoir),1);
    z-index: 111;
}
.message__bouton-fermer { 
    color: rgba(var(--couleurBlanc),1);
    font-weight: bold; 
    text-shadow: 0 0 5px rgba(var(--couleurNoir),0.75);
    font-size: 1.5rem;
    background: none; 
    border: 0;
    
    display: block; 
    position: fixed; 
    right: 1rem; 
    top: 1rem; 
    width: 20px; 
    height: 20px; 

    cursor: pointer;
}
.message::backdrop { 
    background: rgba(var(--couleurNoir),0.75);
}

 
/*  -------------------------------  */
/* |            LA TÊTE            | */
/*  -------------------------------  */
.tete { 
    display: block; 
    margin: 3rem auto 5rem auto; 
    padding: 0;
    width: var(--pageWidth);
}
.tete__titre-entier * { display: block; text-align: right; }
.tete__titre {
    font-size: 3.4rem;
    font-style: italic;
    margin-bottom: 1rem; 
}
.tete__sous-titre {
    font-size: 1.5rem;
}
.tete__date {   
    font-size: 1.5rem;
    margin-top: 0.5rem;
 }

/*  -------------------------------  */
/* |            LE PIED            | */
/*  -------------------------------  */
.pied {
    width: var(--pageWidth);
    margin: 3rem auto 1rem auto; 
    padding: 1rem;
    font-size: 0.8rem;
    text-align: center;
}
.pied__lien { }
.pied__lien:hover { }

.newsletter { 
    width: var(--pageWidth); 
    margin: 0 auto 1rem auto; 
    padding: 0.5rem; 
    font-size: 0.8rem;
    text-align: center;
}
.newsletter__label { }
.newsletter__champ-texte { }
.newsletter__bouton { }


/*  -------------------------------  */
/* |            LE MENU            | */
/*  -------------------------------  */
.menu {
    position: fixed; 
    top: 1rem;
    left: 1rem;
    z-index: 100;
}
/*.menu:hover { background: rgba(var(--couleurNoir),0.1); }*/
.menu[open] { }

.menu__bouton {     
    font-family: 'Noto';
    font-weight: bold; 
    font-size: 1.5rem;
    width: fit-content;
    cursor: pointer;
    list-style-type: none; 
    padding: 1rem;
}
.menu       > .menu__bouton::before { display: inline-block; content: '☰'; }
.menu[open] > .menu__bouton::before { 
    content: '✕'; 
    margin: 0.2rem 0.1rem 0 0.1rem; 
}
.menu__navigation { 
    padding: 0 1rem; 
    max-height: 30rem;
    overflow: auto;
}
.menu__categorie { 
    display: block;
    margin-bottom: 1rem; 
    
    & h3 { display: block; margin: 0; font-size: 1.3rem; font-variant: small-caps; }
    & ul { list-style: none; margin: 0; padding: 0; }
    & li { }
    & a  { font-weight: normal; }
}
.menu__categorie--dates {
    
    & ul { list-style-type: none; }
    & details[name="mois"], & .menu__jours { 
        margin-left: 0.5rem; 
        padding-left: 0.5rem; 
        border-left: 1px dotted black; 
    }
    & summary { list-style-type: none; cursor: pointer; width: fit-content; }
    & .menu__jours { max-width: 11.5rem; }
    & a { 
        display: inline-block; 
        border-radius: 50%; 
        width: 1.5rem;
        height: 1.5rem;
        line-height: 1.5rem;
        text-align: center;  
        vertical-align: middle;
    }
}


/*  -------------------------------  */
/* |             CORPS             | */
/*  -------------------------------  */
main {
    width: var(--pageWidth);
    margin: auto; 
    min-height: 33rem; 
}

main h2 { 
    font-size: 1.5rem;
    margin: 1rem 0;
}


/*  -------------------------------  */
/* |           CONNEXION           | */
/*  -------------------------------  */

.mdp { text-align: center; }
.mdp__titre { }
.mdp__instructions { }
.mdp__formulaire { margin: 0; }


/*  -------------------------------  */
/* |            JOURNAL            | */
/*  -------------------------------  */
.entree {
    display: flex;
    flex-direction: column; /* Aligne les blocs de haut en bas */
    gap: 1.5rem; 
}
.entree__tete { 
    display: flex;                  /* Active Flexbox */
    justify-content: center; /* Espace les éléments aux extrémités */
    align-items: center;            /* Aligne verticalement au centre */
    list-style: none;               /* Supprime les puces de la liste */
    padding: 0;                     /* Supprime les marges internes par défaut */
    margin: 0; 
    gap: 4rem;
    font-size: 1.3rem;
    
    & li { 
/*        width: calc(100% / 3);*/
/*        list-style-type: none;*/
/*        background: red;*/
/*        float: none;*/
        padding: 0; 
        margin: 0;
    }
    & .entree__fleche-gauche a, 
    & .entree__fleche-droite a, & .entree__fleche-gauche span, 
    & .entree__fleche-droite span { font-size: 1.5rem; text-decoration: none; padding: 0.2rem; }
    & .entree__titre {  }
    & .entree__fleche-gauche, 
    & .entree__fleche-droite { }
    
    & .lien--vide { opacity: 0.5; cursor: not-allowed; }
}
.entree__contenu { 
    
    & p { margin: 0.5rem 0; }
/*    &::first-letter { display: inline-block; float: left; font-size: 2.5em; }*/
}
/*
.entree__contenu::after { 
    content: ''; 
    display: block; 
    width: calc(20 * var(--pageWidth) / 100); 
    height: 1px; 
    border-bottom: 1px solid rgba(var(--couleurNoir), 0.7); 
    margin: 2rem auto 0 auto; 
}
*/
.entree__lieux {
    
    & summary { }
    & a { }
}
.entree__documents {
/*    text-align: center; */
    
    & summary { }
    & a { }
    & img {
        --nbDoc: 5;
        --margin: 0.5rem;
        --width: calc(var(--pageWidth) / var(--nbDoc) - var(--margin) * 2);
        width: var(--width);
        height: calc(4 / 3 * var(--width));
        object-fit: cover;

        display: inline-block; 
        margin: var(--margin); 
    }
}


/*  --------------------------------  */
/* |            DOCUMENT            | */
/*  --------------------------------  */

.document {
    display: flex;
    flex-direction: column; /* Aligne les blocs de haut en bas */
    gap: 1.5rem; 
}
.document__image-conteneur { text-align: center; }
.document__image {
    max-width: var(--pageWidth);
    margin: 0;
    padding: 0;
}

.document__description { margin-top: -1rem; }




/*  -------------------------------  */
/* |            EDITEUR            | */
/*  -------------------------------  */

.editeur__formulaire {
    display: flex;
    flex-direction: column; /* Aligne les blocs de haut en bas */
    gap: 0.5rem; 
}

.editeur__champ-texte { width: -webkit-fill-available; }

.editeur__bouton--supprimer { background-color: rgba(var(--couleurSupprimer)); }

.editeur__action { text-align: center; margin-top: 1rem; }


.editeur__image-conteneur { margin-bottom: 1rem; }






/*  ---------------------------------  */
/* |            REPONDANT            | */
/*  ---------------------------------  */

@media only screen and (max-width: 600px) { 
    :root { 
        --fontSizeBase: 16pt; /* 16pt ça permet de bien voir, ça passe 'automatiquement' en vision mobile */
        --pageWidth: calc(100% - 2rem);
/*        --blocRadius: 0;*/
    } 
    
    .tete { margin-bottom: 0rem; }
/*    .pied { width: calc(var(--pageWidth) - 2rem); }*/
/*    .newsletter { width: calc(var(--pageWidth) - 2rem); }*/
    .menu { 
        position: static; 
        width: fit-content; 
        border: 0; 
        background: transparent; 
        margin: 2rem 1rem;
    }
    .menu[open] { width: var(--pageWidth); }
    .menu__bouton::after { content: ' Menu'; font-family: 'Lora'; font-weight: normal; }
    
    .entree__tete { gap: 1rem; }
    
    .entree__documents {
        text-align: center;
        & img {
            --margin: 0.3rem;
            --width: 120px;
        }
    }
}

    
}

@media only screen and (max-width: 400px) { 
    :root { --pageWidth: calc(400px - 2rem); }
    .document__image { display: block; margin-left: -1rem; max-width: calc(var(--pageWidth) + 2rem); }
}
