/* sehnua-design-book.css */
/* This file contains the CSS styles for sehnua design website. */

@import url('sehnua-design.css');

.thumbnail-category {
    visibility: hidden;
    width: 0;
    height: 0;
}

/*.container {
    background-color: yellow;
}*/
#gallery {
    /*background-color: red;*/
    margin: 0;
    padding: 0;
}
/*.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 25px;
    /* padding: 20px; */
/*}*/

/* Vignette */
.thumbnail-container {
    /*background-color: green;*/
    display: inline-block;
    position: absolute;
    transition: all 0.3s ease-out;
    margin: 0;
    padding: 0;
    opacity: 1.0;

    /* transition: transform 0.15s ease-out, opacity 0.15s ease-out; */
    /* transition-delay: 1s; */
}
.thumbnail {
    background: white;
    overflow: hidden;

    transform: translateY(-170px) rotate3d(1, 0, 0, 10deg) translateY(170px);
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;

    /*margin: 0 10px 20px 10px;*/

    box-sizing: border-box; /* la bordure est incluse dans la largeur calculée par placeThumbnails() */
    border-style: solid;
    border-width: 2pt;
    border-radius: 40px 0 40px 0;
    border-top-color: white;
    border-right-color: #888;
    border-bottom-color: #888;
    border-left-color: white;

    transition: all 0.1s ease-out;
    transition: opacity 0.3s ease-out;
}
/* L'ombre couvre toute l'image : .thumbnail-image est son repère (position: relative).
   Sans ça, le repère changeait selon que le filtre de l'image était actif ou non
   (un filter crée un bloc conteneur) : 40 % de la vignette, ou 40 % des 40 % */
.thumbnail-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 40px 0 40px 0;
    box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.2);
    
    transition: all 0.1s ease-out;
}
.thumbnail-image {
    position: relative;
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    border-radius: 40px 0 40px 0;
    box-shadow: inset 0 -3px 3px rgba(0.0, 0, 0, 0.1);

    /*opacity: 0.9;*/
    filter: grayscale(100%) blur(1px);
    transition: all 0.3s ease-out;
}
.thumbnail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 0 0 40px 0;
}
.thumbnail-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    opacity: 0.8;
    transition: all 0.3s ease-out;
}
.thumbnail-subtitle {
    font-size: 0.9rem;
    color: #999;
    /*opacity: 0.0;
    filter: blur(5px);
    -webkit-filter: blur(5px);*/
    transition: all 0.3s ease-out;
    height: 35px;
}
.thumbnail-content {
    padding: 20px;
}
.thumbnail-date {
    position: absolute;
    text-align: center;
    left: -21px;
    bottom: 11px;
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    color: var("--colorTertiary");
    opacity: 0.3;
    transition: all 0.3s ease-out;
    writing-mode: sideways-lr; /* lecture de bas en haut */
}
/* Repli pour les navigateurs plus anciens : à supprimer à terme */
@supports not (writing-mode: sideways-lr) {
    .thumbnail-date {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
    }
}
/* Vignette hover : seulement avec une souris ou un trackpad. Sur écran tactile,
   :hover reste « collé » après un tap, d'où ce media query */
@media (hover: hover) {
    .thumbnail:hover {
        transform: translateY(-170px) rotate3d(1, 0, 0, 0) translateY(170px) !important;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
        /*border-top-width: 3px;*/
        transition: all 0.2s ease-out;

        border-top-color: var(--colorSpecial);
        border-right-color: #888;
        border-bottom-color: #888;
        border-left-color: var(--colorSpecial);
    }
    .thumbnail:hover .thumbnail-image {
        opacity: 1.0;
        filter: grayscale(0%);
        transition: all 0.2s ease-out;
    }
    .thumbnail:hover .thumbnail-title {
        opacity: 1.0 !important;
        transition: all 0.2s ease-out;
    }
    .thumbnail:hover .thumbnail-subtitle {
        opacity: 1.0 !important;
        filter: blur(0px) !important;
        -webkit-filter: blur(0px) !important;
        transition: all 0.2s ease-out;
    }
    .thumbnail:hover .thumbnail-shadow {
        box-shadow: inset 0 -7px 3px rgba(0.0, 0, 0, 0.1);
        transition: all 0.1s ease-out;
    }
}
/* Écran tactile (smartphone, tablette) : pas de survol possible,
   les images sont affichées d'emblée en couleur et nettes */
@media (hover: none) {
    .thumbnail-image {
        filter: none;
    }
}
/* Vignette active */
.thumbnail:active {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
    border-top-color: #888;
    border-right-color: var(--colorSpecial);
    border-bottom-color: var(--colorSpecial);
    border-left-color: #888;
    transition: all 0.0s ease-out;
    position: relative;
    top: 2pt;
}
/* Vignette out */
.thumbnailOutUp {
    opacity: 0.05 !important;
}
/* Vignette à moins de 250px du haut de la fenêtre ou qui dépasse en bas (cf. configThumbnails) */
.thumbnailFaded {
    opacity: 0.1;
    transition: opacity 0.3s ease-out;
}
/* La date (sœur de .thumbnail) s'estompe dans la même proportion : 0.3 × 0.1 */
.thumbnail-container:has(.thumbnailFaded) .thumbnail-date {
    opacity: 0.03;
}

/* Menu position 1 */
#menu {
    z-index: 1000;
    position: fixed;
    margin: auto;
    top: 195px;
    left: 50%;
    margin-left: -325px;
    width: 650px;
    padding: 5px 10px;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255.0, 255.0, 255.0, 1.0);
}
.item {
    display: inline-block;
    padding: 5px 10px 7px 10px;
    margin: 0 5px;
    font-size: 13pt;
    color: #000;
    cursor: pointer;

    border-style: solid !important;
    border: transparent solid 2px;
    border-radius: 10px 0 10px 0;
    
    transition: all 0.3s ease;
}
.item:hover {
    background-color: rgba(255.0, 255.0, 255.0, 0.3);
    border: #ccc solid 2px;
    border-top-color: var(--colorSpecial);
    border-left-color: var(--colorSpecial);

    transition: all 0.1s ease !important;
}
.item:active {
    position: relative;
    top: 2pt;

    border-top-color: #ccc;
    border-bottom-color: var(--colorSpecial);
    border-right-color: var(--colorSpecial);
    border-left-color: #ccc;

    transition: all 0.0s ease !important;
}
.itemSelected, .itemSelected:hover {
    background-color: rgba(255.0, 255.0, 255.0, 0.7);
    border-style: solid !important;
    border: #000 solid 2px;
    border-top-color: var(--colorSpecial);
    border-left-color: var(--colorSpecial);
}
/* Menu position 2 */
@keyframes menuGo2 {
  0%    {opacity: 1.0;top: 180px;}
  70%   {opacity: 0.0;top: 180px;}
  80%   {opacity: 0.0;top: -100px;}
  100%  {opacity: 1.0;top: -5px;}
}
@keyframes menuGo2b {
  0%    {opacity: 1.0;top: 150px;}
  70%   {opacity: 0.0;top: 150px;}
  80%   {opacity: 0.0;top: -100px;}
  100%  {opacity: 1.0;top: -5px;}
}
/*@keyframes itemGo2 {
  0%    {border-width: 2px;border-radius: 15px;font-size: 13pt;top:0}
  70%   {border-width: 2px;border-radius: 15px;font-size: 11pt;top:-10px}
  80%   {border-width: 0 2px 2px 2px;border-radius: 0 0 15px 15px;font-size: 11pt;}
  100%  {border-width: 0 2px 2px 2px;border-radius: 0 0 15px 15px;font-size: 11pt;}
}*/
@keyframes itemGo2 {
  0%    {border-width: 2px; border-radius: 15px; font-size: 13pt; top: 0;}
  70%   {border-width: 2px; border-radius: 15px; font-size: 13pt; top: 0;}
  80%   {border-width: 0 2px 2px 2px; border-radius: 0 0 15px 15px; font-size: 11pt; top: 0;}
  100%  {border-width: 0 2px 2px 2px; border-radius: 0 0 15px 15px; font-size: 11pt; top: 0;}
}
@keyframes itemGo2b {
  0%    {border-width: 2px;border-radius: 15px;top:0}
  70%   {border-width: 2px;border-radius: 15px;top:-10px}
  80%   {border-width: 0 2px 2px 2px;border-radius: 0 0 15px 15px;}
  100%  {border-width: 0 2px 2px 2px;border-radius: 0 0 15px 15px;}
}
.menuSeparator {
    color: #ccc;
    font-weight: bold;
}

/* DESKTOP 800>1150 */
@media (min-width: 800px) and (max-width: 1150px) {
    /* Menu */
    #menu {
        top: 150px;
        width: 630px !important;
        margin-left: -325px !important;
    }
    .item {
        font-size: 80%;
    }
}

/* SMARTPHONE */
@media (max-width: 800px) {
    /*.gallery {
        grid-template-columns: repeat(auto-fill, minmax(1fr, 1fr));
    }*/
    /* Vignette */
    .thumbnail-content {
        position: absolute;
        top: 0;
        left: 40%;
        padding-right: 20px;
    }
    .thumbnail-image {
        width: 40%;
        height: 100px;
    }
    .thumbnail-title {
        font-size: 80%;
    }
    .thumbnail-subtitle {
        font-size: 80%;
    }
    .thumbnail-date {
        font-size: 60%;
    }
    /* Menu */
    #menu {
        position: fixed !important;
        top: inherit !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: 100% !important;
        padding: 20px 0 !important;
        margin: 0 !important;

        background: linear-gradient(0deg, #fff, transparent) !important;
    }
    .item {
        font-size: 80%;
        padding: 3px 7px 5px 7px;
        margin: 0 3px;
    }
}
@media (max-width: 500px) {
    .thumbnail-image {
        height: 100px;
    }
    .thumbnail-title {
        font-size: 70%;
    }
    .thumbnail-subtitle {
        font-size: 70%;
    }
    .item {
        font-size: 70%;
        padding: 3px 5px 5px 5px;
        margin: 0;
    }
}