/* ============================================================
   FLOWW-EXE — feuille de style commune à toutes les pages
   du menu (about / gallery / cards / links / references)
   ============================================================ */

@font-face {
    font-family: 'Impact321';
    src: url('/polices/321impact.ttf') format('truetype');
}
@font-face {
    font-family: 'CourierTXT';
    src: url('/polices/COURIERTXT.ttf') format('truetype');
}

:root{
    --red:      #B00B28;
    --violet:   #6A2FD9;
    --paper:    #EFE7D8;
    --win-face: #c0c0c0;
    --win-blue-a: #000080;
    --win-blue-b: #1084d0;
}

*{ box-sizing: border-box; }

html, body{
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    color: #111;
    font-family: 'CourierTXT', 'Courier New', monospace;
}

body{
    background-image: url('/images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.page-wrap{
    position: relative;
    width: 960px;
    max-width: 96vw;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header.masthead{
    background: var(--win-face);
    border: 2px solid #000;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
    width: fit-content;
    margin: 0 auto 40px;
    padding: 20px 56px;
}
header.masthead h1{
    margin: 0;
    font-family: 'Impact321', Impact, sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    letter-spacing: 1px;
    color: #111;
    text-align: center;
}
header.masthead a{
    text-decoration: none;
    color: inherit;
}

/* ---- Badges "gif" flottants façon sticker ---- */
.gif-badge{
    position: absolute;
    z-index: 3;
    filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.5));
    pointer-events: none;
}
.gif-badge img{
    display: block;
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
}
.gif-badge.top-right{
    top: -20px;
    right: -50px;
    transform: rotate(6deg);
}
.gif-badge.bottom-left{
    bottom: -30px;
    left: -55px;
    transform: rotate(-6deg);
}
.gif-badge.top-left{
    top: -20px;
    left: -50px;
    transform: rotate(-6deg);
}
.gif-badge.bottom-right{
    bottom: -30px;
    right: -55px;
    transform: rotate(6deg);
}

/* ---- Fenêtres rétro Windows ---- */
.windows-row{
    position: relative;
    display: flex;
    gap: 26px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
}

.win-window{
    background: var(--win-face);
    border: 2px solid #000;
    border-top-color: #fff;
    border-left-color: #fff;
    box-shadow:
        inset -1px -1px 0 #000,
        inset 1px 1px 0 #dfdfdf,
        5px 5px 0 rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    height: 580px;
}

.win-titlebar{
    background: linear-gradient(90deg, var(--win-blue-a), var(--win-blue-b));
    color: #fff;
    font-family: Impact321, 'Segoe UI', sans-serif;
    font-weight: bold;
    font-size: 0.95rem;
    letter-spacing: 1px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.win-titlebar .win-buttons{
    display: flex;
    gap: 4px;
}
.win-titlebar .win-buttons span{
    width: 18px;
    height: 16px;
    background: var(--win-face);
    color: #000;
    border: 1px solid #000;
    border-top-color: #fff;
    border-left-color: #fff;
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---- Fenêtre nav ---- */
.nav-window{
    width: 230px;
    flex-shrink: 0;
}
nav.side-nav{
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
}
nav.side-nav a{
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: #111;
    background: var(--paper);
    border: 2px solid #000;
    border-top-color: #fff;
    border-left-color: #fff;
    padding: 20px 10px;
    font-weight: bold;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}
nav.side-nav a:hover,
nav.side-nav a:focus-visible{
    background: #fff;
}
nav.side-nav a.active{
    background: var(--red);
    color: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 2px var(--violet);
}

/* ---- Fenêtre contenu principal ---- */
.main-window{
    width: 640px;
    flex-shrink: 0;
}
main.content{
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--red) #000;
}
main.content::-webkit-scrollbar{
    width: 12px;
}
main.content::-webkit-scrollbar-track{
    background: #000;
}
main.content::-webkit-scrollbar-thumb{
    background: var(--red);
    border: 2px solid #000;
}
main.content h2{
    margin: 0 0 16px;
    font-size: 1.5rem;
    font-weight: bold;
}
main.content p{
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px;
    color: #222;
}

.content-media{
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* ---- Bande de blinkies ---- */
.blinkie-strip{
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #000;
    border: 2px solid #000;
    padding: 8px;
    margin-top: 20px;
}
.blinkie-strip img{
    height: 31px;
    width: auto;
    image-rendering: pixelated;
}
.img-placeholder{
    width: 165px;
    height: 115px;
    border: 2px solid #000;
    background: linear-gradient(#bfe3f2 0%, #bfe3f2 55%, #8fbf5a 55%, #8fbf5a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.05rem;
    color: #111;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* ---- Liste d'items générique (gallery / cards / links / references) ---- */
.list-item{
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 2px dashed #888;
}
.list-item:last-child{
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.list-item img{
    width: 190px;
    height: 110px;
    object-fit: cover;
    border: 2px solid #000;
    flex-shrink: 0;
    background: #dfe9c9;
}
.list-item .text h3{
    margin: 0 0 8px;
    font-size: 1.2rem;
}
.list-item .text p{
    margin: 0 0 6px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #222;
}
.list-item .text a.ext-link{
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--red);
}
.list-empty{
    font-size: 0.9rem;
    color: #333;
}

/* ---- Barre de filtres (gallery) ---- */
.filter-bar{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.filter-btn{
    background: var(--paper);
    border: 2px solid #000;
    padding: 6px 14px;
    font-family: 'CourierTXT', 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: lowercase;
}
.filter-btn:hover{
    background: #fff;
}
.filter-btn.active{
    background: var(--red);
    color: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 2px var(--violet);
}

/* ---- Grille (gallery / cards / moodboard) ---- */
.grid-list{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.grid-item img{
    width: 100%;
    height: 140px;
    object-fit: cover;
    border: 2px solid #000;
    cursor: zoom-in;
    display: block;
}
.grid-item img:hover{
    outline: 3px solid var(--red);
    outline-offset: -3px;
}
.grid-titre{
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 8px;
}

/* ---- Images cliquables (agrandissement) ---- */
.list-item img.clickable-img{
    cursor: zoom-in;
}
.list-item img.clickable-img:hover{
    outline: 3px solid var(--red);
    outline-offset: -3px;
}

/* ---- Lightbox (vue agrandie) ---- */
.lightbox{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 30px;
}
.lightbox.hidden{
    display: none;
}
.lightbox-inner{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 90vw;
    max-height: 90vh;
}
.lightbox-inner img{
    max-width: 90vw;
    max-height: 70vh;
    border: 3px solid var(--paper);
    box-shadow: 0 0 0 3px #000;
}
.lightbox-text{
    background: var(--paper);
    border: 2px solid #000;
    padding: 12px 18px;
    max-width: 480px;
    text-align: center;
}
.lightbox-text.hidden{
    display: none;
}
.lightbox-text h3{
    margin: 0 0 6px;
    font-size: 1.1rem;
}
.lightbox-text p{
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #222;
}
.lightbox-close{
    position: absolute;
    top: -18px;
    right: -18px;
    width: 36px;
    height: 36px;
    background: var(--red);
    color: #fff;
    border: 2px solid #000;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.lightbox-download{
    background: var(--paper);
    color: #111;
    border: 2px solid #000;
    padding: 8px 18px;
    font-weight: bold;
    text-decoration: none;
    font-family: 'CourierTXT', 'Courier New', monospace;
}
.lightbox-download.hidden{
    display: none;
}

@media (max-width: 960px){
    header.masthead{ padding: 12px 28px; margin-bottom: 20px; }
    .windows-row{ flex-direction: column; align-items: stretch; }
    .nav-window{ width: 100%; height: auto; }
    nav.side-nav{ flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 8px; }
    nav.side-nav a{ padding: 10px 8px; font-size: 0.95rem; }
    .main-window{ width: 100%; height: 46vh; }
    .gif-badge{ display: none; }
    .list-item{ flex-direction: column; }
    .list-item img{ width: 100%; height: auto; }
    .grid-list{ grid-template-columns: 1fr; }
}
