﻿/* GLOBAL */
html, body{
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #1e1e1e;
    color: white;

    /* 🔥 IMPORTANT: permet le scroll correct */
    min-height: 100%;
    overflow-x: hidden;
}

/* HEADER */
.header{
    width: 100%;
    background: #111;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.header-container{
    width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.logo{
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

/* MENU */
.menu{
    display: flex;
    gap: 20px;
}

.menu a{
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
}

.menu a:hover{
    opacity: 1;
}

/* PUB */
.ad-box{
    width: 250px;
    height: 60px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
    color: white;
}

/* WRAPPER PRINCIPAL */
.wrapper{
    display: flex;
    gap: 20px;
    padding: 20px;

    /* 🔥 IMPORTANT pour footer visible */
    min-height: calc(100vh - 120px);
    align-items: flex-start;
}

/* MAIN */
.main{
    flex: 1;
}

/* SIDEBAR */
.sidebar{
    width: 300px;
}

/* TITRE */
h1{
    text-align: center;
    margin-bottom: 20px;
}

/* BIBLIOTHÈQUE PDF */
.library{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ITEM PDF */
.item{
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    text-align: center;
    transition: 0.3s;
    color: black;
    text-decoration: none;
}

.item:hover{
    transform: translateY(-5px);
}

/* THUMBNAIL */
.thumb{
    height: 150px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumb canvas{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* TITRE PDF */
.title{
    padding: 10px;
    font-weight: bold;
}

/* DATE */
.date{
    color: #666;
    font-size: 13px;
}

/* BOUTON COPIER */
.copy-btn{
    margin: 10px auto 15px;
    display: block;
    padding: 8px 12px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.copy-btn:hover{
    background: #0056b3;
}

/* FOOTER (IMPORTANT) */
footer{
    background: #111;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* RESPONSIVE TABLETTE */
@media(max-width: 1024px){
    .library{
        grid-template-columns: repeat(2, 1fr);
    }
}

/* RESPONSIVE MOBILE */
@media(max-width: 768px){
    .wrapper{
        flex-direction: column;
    }

    .sidebar{
        width: 100%;
    }

    .library{
        grid-template-columns: 1fr;
    }
}