﻿
#scroll-bar {
    height: 3px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 12;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden
}
#scroll-bar-inner {
    background-color: #a322dc;
    height: 100%
}
/* Le conteneur principal qui bloque tout l'écran */
#image-popin {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
}

.popin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Barre d'actions supérieure */
.popin-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    z-index: 1010;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: #fff;
}

.popin-counter {
    font-size: 14px;
    font-family: sans-serif;
    opacity: 0.85;
}

.popin-actions {
    display: flex;
    align-items: center;
    gap: 20px; /* Espace net entre le pilulier Galerie et la croix */
}

.grid-toggle-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    padding: 6px 14px;
    font-size: 13px;
    font-family: sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    /* On s'assure qu'aucune marge parasite ne déborde */
    margin: 0; 
}

.close-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-button:hover {
    opacity: 1;
}

.grid-toggle-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Zone d'affichage principale */
.popin-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1005;
}

.popin-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popin-content img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.15s ease-in-out;
}

.popin-image-wrapper .caption {
    color: #ddd;
    margin-top: 12px;
    font-size: 14px;
    font-family: sans-serif;
    text-align: center;
    max-width: 800px;
}

/* Boutons de navigation */
.prev-button, .next-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 50%;
    user-select: none;
    transition: background 0.2s;
    z-index: 1010;
}

.prev-button { left: -60px; }
.next-button { right: -60px; }

@media (max-width: 768px) {
    .prev-button { left: 10px; }
    .next-button { right: 10px; }
}

.prev-button:hover, .next-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Vue grille */
.popin-grid-view {
    display: none;
    position: absolute;
    top: 70px;
    bottom: 20px;
    left: 20px;
    right: 20px;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    overflow-y: auto;
    z-index: 1005;
    padding: 10px;
}

.popin-grid-view.active {
    display: grid;
}

.popin-grid-view img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    border: 2px solid transparent;
}

.popin-grid-view img:hover {
    opacity: 1;
    transform: scale(1.03);
}

.popin-grid-view img.active {
    opacity: 1;
    border-color: #ffffff;
}
/* */

.lire-aussi {
    margin: 30px 0 !important;
    padding: 15px 20px !important;
    background-color: var(--bg-surface-soft,#f9f9f9);
    border-radius: 4px;
    border-left: 4px solid #dc5300;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05) !important;
}

.lire-aussi_titre {
    color: var(--accent,#dc5300);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--border-note,#ddd);
    white-space: nowrap;
}

.lire-aussi_titre_desc {
    font-weight: 600;
    flex: 1;
}

.lire-aussi_titre_desc a {
    color: var(--text-inline,#333) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.lire-aussi_titre_desc a:hover {
    color: var(--accent,#dc5300) !important;
    text-decoration: underline !important;
}

.lire-aussi_titre_desc span {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-subtle,#777);
    margin-left: 5px;
}


.sidebar-tech-sheet {
    background: var(--bg-surface-quote,#fdfdfd);
    border: 1px solid var(--border-offer-card,#e5e5e5);
    border-radius: 8px;
    padding: 15px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.sheet-header {
    border-bottom: 2px solid #dc5300;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.sheet-header h2 {
    font-size: 1.1rem;
    margin: 0;
    text-transform: uppercase;
    color: var(--text-inline,#333);
}

.game-title {
    font-size: 0.9rem;
    color: #dc5300;
    font-weight: bold;
}

.info-row {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-hair,#f0f0f0);
}


.info-row .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-label,#999);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.info-row .value {
    font-size: 0.9rem;
    color: var(--text-value,#222);
    margin-top: 2px;
}

.info-row .value a {
    color: var(--accent,#dc5300);
    text-decoration: none;
}

/* Bloc PEGI compact pour sidebar */
.pegi-sidebar {
    background: var(--line-f1,#f1f1f1);
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
}

.pegi-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pegi-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-emphasis,#444);
}

.pegi-badges {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}


.article-nav {
    display: flex;
	align-items: stretch;
    gap: 15px;
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft,#eee);
}

.nav-box {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--bg-surface-soft,#f9f9f9);
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-box:hover {
    background: var(--bg-surface,#fff);
    border-color: var(--accent,#dc5300);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-box.next { text-align: right; justify-content: flex-end; }

.nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-label,#999);
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-size: 0.95rem;
    color: var(--text-inline,#333);
    font-weight: 600;
    line-height: 1.3;
}


/* Mobile : On empile les blocs */
@media (max-width: 600px) {
    .article-nav { flex-direction: column; }
}

.reco-title { 
    font-size: 1.4rem; 
    font-weight: 800; 
    margin-bottom: 20px; 
    border-left: 5px solid #dc5300; 
    padding-left: 15px;
    color: var(--text-inline,#333);
}

.note-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: #e74c3c;
    color: white;
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 5px;
    transform: rotate(2deg);
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
