/* ----------------------------------------------
Auteur/author : nicodeux
Dernière mise à jour/last update : 02/04/2025
Licence : GNU General Public License v3.0
---------------------------------------------- */

#plein-ecran * {
    color: var(--marron-sombre);
}

#plein-ecran * a {
    color: inherit;
    font-weight: inherit;
    font-style: inherit;
    font-size: inherit;
    text-decoration: underline;
}

#plein-ecran * a:hover {
    color: var(--rose-sakura);
}

#plein-ecran * strong {
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    font-style: inherit;
    font-weight: bold;
}

#plein-ecran * em {
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    font-style: italic;
    font-weight: inherit;
}

/* #################################
   Conteneur principal et arbre
##################################*/

@media (orientation: landscape) {
    #calendriers, #arbre-block, #arbre-holder, #arbre, #arbre-flou {
        height: 100%;
    }

    body {
        font-size: calc(6px + 1.706485vh);
    }
}

@media (orientation: portrait) {
    #calendriers, #arbre-block, #arbre-holder, #arbre, #arbre-flou {
        width: 100%;
    }

    body {
        font-size: calc(6px + 1.706485vw);
    }
}

#calendriers {
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

#arbre-block {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#arbre-holder {
    margin: auto 0;
    align-self:stretch;
    display:flex;
    align-items:center;
    position: relative;
}

#arbre-flou, #lanterne-soleil-flou, #lanterne-lune-flou {
    z-index: 0;
    filter: blur(0.2em);
    opacity: 0.5;
}

#cadre-bas-flou, #cadre-haut-flou {
    z-index: 0;
    filter: blur(0.1em);
    opacity: 0.5;
}

#arbre, #cadre-bas, #cadre-haut, #lanterne-soleil, #lanterne-lune {
    filter: blur(0.03em);
}


/* Classe prévue pour aligner le contenu en haut à gauche du conteneur parent
    Pratique pour superposer des images les unes sur les autres si elles sont
    de dimensions équivalentes */
.calque {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

#lanterne-soleil, #lanterne-soleil-flou {
    position: absolute;
    top: 47.54%;
    left: 51.45%;
    width: 5.65% !important;
    height: auto;
    animation: balance ease-in-out 4s infinite;
    animation-direction: alternate;
    transform-origin: 50% 0;
    transform: rotate(-3deg);
}

#lanterne-lune, #lanterne-lune-flou {
    position: absolute;
    top: 45%;
    left: 84.15%;
    width: 5.65% !important;
    height: auto;
    animation: balance ease-in-out 4s infinite;
    animation-direction: alternate;
    animation-delay: 1000ms;
    transform-origin: 50% 0;
    transform: rotate(-3deg);
}

@keyframes balance {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(7deg); }
}

/* ##############################
   Calendriers et leur contenu
###############################*/

#calendriers-holder {
    position: absolute;
    display: flex;
    flex-direction: column-reverse;
    left: 3.4%;
    bottom: 38%;
    width: 30.2%;
    min-height: 22%;
    max-height: 55%;
    height: 55%;
    overflow: hidden;
    box-sizing: content-box;
}

#calendriers-holder img {
    position: absolute;
    width: 100%;
    display: block;
    z-index: 0;
}

.calendrier-spacer {
    display: block;
    height: 1em;
}

#cadre-bas, #cadre-bas-flou {
    bottom: 0;
}

#cadre-haut, #cadre-haut-flou {
    top: 0;
    transition: top 200ms;
}

#contenu-calendrier {
    position: relative;
    /* La hauteur totale du conteneur moins les deux spacers de 1em chacun */
    max-height: calc(100% - 2em);
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    margin: 0 0.5em;
    transition: height 200ms;
}

/* Les sélecteurs pour passer d'un calendrier à l'autre */

#calendrier-nav {
    display: flex;
    flex-wrap: wrap;
    min-height: 2em;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0.4em 0;
}

#calendrier-nav span {
    position: relative;
    z-index: 10;
    font-size: 0.6em;
    background-color: transparent;
    border-radius: 0.8em;
    padding: 0.2em 0.4em;
    margin: 0 0.2em;
    border: 1px solid transparent;
    cursor: pointer;
}

/* Couleur de fond du calendrier sélectionné */
.bg_sakura {
    background-color: var(--rose-sakura) !important;
}

.bg_sakura:hover {
    color: var(--marron-sombre) !important;
}

#calendrier-nav span:hover {
    border: 1px solid var(--marron-sombre);
}

/* Le contenu des calendriers : titre et événements associés */

#calendrier-texte p, #calendrier-texte h2 {
    font-size: 0.7em;
    text-align: left;
    padding: 0 1.6em;
    margin-bottom: 0.5em;
}

#calendrier-texte p em {
    font-size: inherit;
    color: var(--rose-sakura);
}

#calendrier-texte h2 {
    font-weight: bold;
    text-align: center;
}

#calendrier-texte hr, #text-haiku hr {
    border: 1px solid #800;
    margin: 0.5em 20%;
    box-shadow: 0 0 2px var(--orange-pastel-alpha);
}

/* #############################################
   Eléments utilitaires (à propos et autres...)
##############################################*/

#utilitaires {
    position: absolute;
    display: block;
    left: 3.4%;
    top: 67%;
    width: 30.2%;
    z-index: 2;
}

#utilitaires p {
    width: 70%;
    margin: 0.5em auto;
    font-size: 0.6em;
    padding-left: 1.4em;
}

#infos-bouton:hover {
    cursor: pointer;
    color: var(--rose-sakura);
}

#infos-bouton, #saisons-bouton {
    background-repeat: no-repeat;
    background-position: 0 50%;
    background-size: 1em;
    cursor: pointer;
}

#infos-bouton {
    background-image: url(../images/infos.svg);
}

#saisons-bouton {
    background-image: url(../images/reload.svg);
}

.saison {
    display: inline-block;
    border-radius: 0.7em;
    padding: 0.15em 0.35em;
    margin: 0 0.1em;
}

/* ######################
   Pierre avec haïku
#######################*/

#bouton-pierre {
    position: absolute;
    display: block;
    top: 58%;
    left: 36.5%;
    width: 7.8%;
    height: 15%;
    cursor: help;
    z-index: 999;
}

#bouton-pierre:hover ~ #haiku {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

#haiku {
    position: absolute;
    top: 53%;
    left: 44.5%;
    min-width: 20%;
    max-width: 30%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#bulle-haiku {
    display: block;
    position: absolute;
    left: 0;
    top: auto;
    background-image: url(../images/bulle_pointe.svg);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    width: calc(5.6% + 1px);
    height: 100%;
}

#text-haiku {
    background-color: var(--blanc-alpha);
    margin-left: 5.6%;
    border: 1px solid #fdd6d6;
    text-align: left;
    padding: 0.9em;
    border-radius: 0.5em;
    box-shadow: 0.2em 0.2em 0.4em #66010166;
}

#text-haiku h4, #text-haiku p {
    font-size: 0.6em;
}

#text-haiku h4 {
    font-weight: bold;
}

#text-haiku h4, #text-haiku hr {
    margin-bottom: 0.5em;
}

/* ###################################
   Effets visuels liés aux saisons
 ###################################*/

/* Conteneur principal des effets */
#chutes-feuilles, #neige {
    position: absolute;
    top: 0;
    margin: 0 auto;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#neige {
    z-index: 1;
}

/* Animations des principaux effets : rotations, balancements, contractions... */

.rotation-horaire {
    animation: rotation-horaire 4s linear infinite;
}

@keyframes rotation-horaire {
    from {transform: rotate(0deg);}
    to   {transform: rotate(360deg);}
}

.rotation-antihoraire {
    animation: rotation-antihoraire 4s linear infinite;
}

@keyframes rotation-antihoraire {
    from {transform: rotate(0deg);}
    to   {transform: rotate(-360deg);}
}

.contraction-x {
    animation: contraction-x 2s linear infinite;
    animation-direction: alternate;
}

@keyframes contraction-x {
    0%   {transform: scaleX(1) rotate(0deg);}
    100% {transform: scaleX(0.5) rotate(360deg);}
}

.berceau {
    animation: berceau 2s linear infinite;
    animation-direction:alternate;
    transform-origin: 50% 0;
}

@keyframes berceau {
    from {transform: rotate(-40deg);}
    to   {transform: rotate(40deg);}
}

/* Printemps */

.petale {
    position: absolute;
    top: 1.5%;
    left: 30%;
    display: block;
    width: 0.7em;
    height: 0.7em;
    filter: blur(0.02em);
    background-repeat: no-repeat;
    background-size: contain;
}

.petale-tourne {
    background-image: url(../images/petale_tourne.svg);
}

.petale-normal {
    background-image: url(../images/petale.svg);
}

/* Automne */

.feuille {
    position: absolute;
    top: 1.5%;
    left: 30%;
    display: block;
    width: 3em;
    height: 3em;
    filter: blur(0.02em);
    background-repeat: no-repeat;
    background-size: contain;
}

.feuille_rouge {
    background-image: url(../images/feuille_rouge.svg);
}

.feuille_orange {
    background-image: url(../images/feuille_orange.svg);
}

.feuille_rouge_tourne {
    background-image: url(../images/feuille_rouge_tourne.svg);
}

.feuille_orange_tourne {
    background-image: url(../images/feuille_orange_tourne.svg);
}

/* Eté */

.feuille_vert_c {
    background-image: url(../images/feuille_verte.svg);
}

.feuille_vert {
    background-image: url(../images/feuille_verte_sombre.svg);
}

.feuille_vert_c_tourne {
    background-image: url(../images/feuille_verte_tourne.svg);
}

.feuille_vert_tourne {
    background-image: url(../images/feuille_verte_sombre_tourne.svg);
}

/* Hiver */

.flocon {
    position: absolute;
    display: block;
    top: -4%;
    left: 2%;
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    filter: blur(0.05em);
    background-color: white;
    border-bottom: 1px solid var(--marron-sombre);
    border-right: 1px solid var(--marron-sombre);
    border-top: 2px solid #fdd0d0ff;
    border-left: 2px solid #fdd0d0ff;
}

/* ###############################
    Pied et bas de page
############################### */

#logo-n2 a {
    background-image: url(../images/ln2.svg);
}

#texte-pp {
    color: var(--marron-sombre);
}

#texte-pp a:hover {
    color: var(--rose-sakura);
}

.valide {
    border: 1px solid var(--marron-sombre);
}

.valide:hover {
    color: var(--marron-sombre) !important;
    background-color: var(--rose-sakura);
}
