/* ==========================================
   GÉNÉRAL
========================================== */

#gallery-container,
#gallery-container *{
    box-sizing:border-box;
}

#gallery-container{
    max-width:1200px;
    margin:auto;
    padding:10px;
}


/* ==========================================
   ACTIONS PHOTOS
========================================== */

.photo-actions{
    position:absolute;

    left:0;
    right:0;
    bottom:0;

    display:flex;

    justify-content:center;
    align-items:center;

    gap:10px;

    padding:8px;

    z-index:10;
}

.photo-actions button,
.photo-actions .is-main{
    display:flex;

    justify-content:center;
    align-items:center;

    width:40px;
    height:40px;

    border:none;
    border-radius:8px;

    background:rgba(255,255,255,.45);

    font-size:20px;
    font-weight:600;
}

.photo-actions button{
    cursor:pointer;

    opacity:.9;

    transition:.2s;
}

.photo-actions button:hover{
    opacity:1;
    transform:scale(1.1);
}

.photo-actions .is-main{
    cursor:default;
}

.delete{
    color:#e74c3c;
}


/* ==========================================
   UPLOAD
========================================== */

#upload-zone{
    text-align:center;

    margin-top:10px;
}

#upload-button{
    display:inline-block;

    background:#4a90e2;
    color:white;

    padding:14px 24px;

    border-radius:12px;

    font-size:16px;
    font-weight:bold;

    cursor:pointer;

    transition:.2s;
}

#upload-button:hover{
    background:#357bd8;
}

#upload-text{
    margin-top:10px;

    font-size:14px;
    color:#555;
}

.bt_visible{
    display:block;
}

.bt_cache{
    display:none;
}

/* ==========================================
   LISTE UPLOAD
========================================== */

#upload-list{
    margin-top:15px;
}

.upload-item{
    margin-bottom:10px;
}

.upload-file{
    margin-bottom:4px;

    font-size:13px;
}

.upload-progress{
    height:8px;

    background:#ddd;

    border-radius:4px;

    overflow:hidden;
}

.upload-progress-bar{
    height:100%;

    width:0;

    background:#4caf50;

    transition:width .2s linear;
}

.upload-info{
    margin-top:2px;

    font-size:12px;
}

.uploading{
    opacity:.6;
    pointer-events:none;
}

/* ==========================================
   LÉGENDE
========================================== */

.photo-legend{
    margin-top:30px;

    text-align:center;
}


#photo-counter{
    margin-bottom:20px;
    font-weight:bold;
}


.photos-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
    gap:15px;

    max-width:930px;
    margin:0 auto;
}


.photo-slot{
    position:relative;
}
.photo-slot:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,.12);
}
.photo-slot img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    display:block;
	border-radius:12px;
}

.photo-slot.is-main{
    border:3px solid #4caf50;
    padding:2px;
    background:white;
    border-radius:12px;
}
.photo-slot.is-main img{
    border-radius:8px;
}


.badge-main{
    position:absolute;
    top:2px;
    left:2px;
    padding:3px 5px;
	    background:#4caf50;
    color:#fff;
	
    font-size:12px;
	    font-weight:bold;
    border-radius:8px;
    z-index:10;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width:768px){
    html,
    body{
        overflow-x:hidden;
    }
}