/* ================================
   POCHES - STYLES
   Page de galerie d'images catégorisées
================================ */

/* Background */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    height: 100%;
    padding: 0;
    margin: 0;
    background-image: url('../../../../../../assets/backgrounds/background-05.svg');
    background-size: cover;
    background-position: top;
}

.path-subnav {
    background-color: hsla(276, 100%, 10%, 0.75);
}

/* ================================
   PAGE LAYOUT
================================ */

.poches-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ================================
   HEADER
================================ */

.poches-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poches-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--txt-size-09);
    color: var(--button-global-color);
    text-decoration: none;
    margin-bottom: 8px;
    transition: opacity 0.2s ease;
    width: fit-content;
}

.poches-back-link:hover {
    opacity: 0.7;
}

.poches-header h1 {
    font-size: var(--txt-size-13);
    color: var(--txt-color-blackop-90);
    margin: 0;
}

.poches-header p {
    font-size: var(--txt-size-09);
    color: var(--txt-color-blackop-60);
    margin: 0;
    max-width: 600px;
}

/* ================================
   SELECT CATÉGORIE
================================ */

.poches-select-wrapper {
    position: relative;
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    padding: 16px 30px;
    box-sizing: border-box;
    background-color: var(--global-transparent-white-2);
    backdrop-filter: blur(17px);
    border: 1px solid var(--global-transparent-white-1);
    border-radius: 99px;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.1);
}

.poches-select-label {
    font-size: var(--txt-size-08);
    font-weight: 500;
    color: var(--txt-color-blackop-70);
    white-space: nowrap;
}

.poches-select-container {
    flex: 1;
    width: 100%;
}

.poches-custom-select {
    position: relative;
    font-size: var(--txt-size-08);
    font-weight: 400;
    min-width: 180px;
}

.poches-custom-select select {
    display: none;
}

.poches-custom-select .select-selected {
    background-color: transparent;
    border-radius: 8px;
    padding: 10px 40px 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poches-custom-select .select-selected:hover {
    font-weight: 600;
}

.poches-custom-select .select-selected:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-color: rgba(0, 0, 0, 0.6) transparent transparent transparent;
    transition: transform 0.2s ease;
}

.poches-custom-select .select-selected.select-arrow-active:after {
    transform: translateY(-50%) rotate(180deg);
}

/* Items du select (options) */
.poches-custom-select .select-items {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px) saturate(1.2);
    -webkit-backdrop-filter: blur(25px) saturate(1.2);
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 99;
    padding: 8px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
}

.poches-custom-select .select-items div {
    color: rgba(0, 0, 0, 0.85);
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.poches-custom-select .select-items div:hover {
    background-color: rgba(0, 100, 255, 0.1);
}

.poches-custom-select .select-items div.same-as-selected {
    background-color: var(--button-global-color);
    color: white;
    font-weight: 500;
}

.poches-custom-select .select-items div.same-as-selected:hover {
    background-color: var(--button-global-color-hover);
}

.poches-custom-select .select-hide {
    display: none;
}

/* ================================
   GALERIE D'IMAGES
================================ */

.poches-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 24px;
    width: 90vw;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 540px) {
    .poches-gallery {
        grid-template-columns: 1fr;
        width: 95vw;
    }
}

/* ================================
   CARTE IMAGE
================================ */

.poche-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(16px) brightness(1.02);
    border: 1px solid var(--global-transparent-white-1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poche-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Titre de la poche */
.poche-card-title {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 14px 20px;
    font-size: var(--txt-size-10);
    font-weight: 600;
    margin: 0;
}

/* Conteneur image */
.poche-card-image {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.poche-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
}

/* Ligne de référence (style archivage) */
.poche-card-reference {
    font-size: var(--txt-size-08);
    color: var(--txt-color-blackop-50);
    background-color: rgba(245, 245, 247, 0.85);
    padding: 10px 20px;
    text-align: right;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

/* ================================
   SECTION TÉLÉCHARGEMENTS
================================ */

.poches-downloads {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.poches-downloads h2 {
    margin: 0;
    color: var(--txt-color-blackop-50);
    font-weight: 400;
    font-size: var(--txt-size-10);
}

.poches-downloads-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Boutons de téléchargement - styles depuis sgbl_contenus-normalises */
.poches-downloads .download-elements {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: var(--global-white-2);
    padding: 16px 20px;
    border-radius: 14px;
    border: 2px solid var(--global-transparent-white-1);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.poches-downloads .download-elements:hover {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    background-color: var(--global-white-1);
    border-color: white;
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.poches-downloads .download-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poches-downloads .download-description h3 {
    font-size: var(--txt-size-10);
    font-weight: 600;
    margin: 0;
    color: var(--txt-color-blackop-90);
}

.poches-downloads .download-description p {
    font-size: var(--txt-size-08);
    margin: 0;
    color: var(--txt-color-blackop-60);
}

.poches-downloads .download-button-container {
    flex-shrink: 0;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .poches-page {
        padding: 32px 16px 60px;
    }
    
    .poches-select-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
        gap: 8px;
        border-radius: 12px;
    }
    
    .poches-select-container {
        width: 100%;
        background-color: rgba(255, 255, 255, 0.50);
        border-radius: 8px;
    }
    
    .poches-custom-select {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .poches-downloads .download-elements {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    
    .poches-downloads .download-description {
        text-align: center;
    }
    
    .poches-downloads .download-button-container {
        width: 100%;
        text-align: center;
    }
}
