body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; margin: 0; }
nav { background: #2c3e50; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: bold; font-size: 1.2em; }
.container { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
.container-fluid { width: 95%; margin: 20px auto; }

/* Box Upload & Download */
.upload-box, .download-zone { background: white; padding: 20px; border-radius: 10px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 20px; }
.download-zone { border: 2px dashed #dfe6e9; }
.btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

/* Inputs & Buttons */
input[type="file"] { margin: 10px 0; }
button { cursor: pointer; border: none; padding: 10px 20px; border-radius: 5px; font-size: 1em; }
form button { background: #3498db; color: white; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.card { background: white; padding: 10px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.card img { width: 100%; height: 150px; object-fit: cover; border-radius: 5px; }
.actions { margin-top: 10px; display: flex; gap: 5px; }

/* Boutons Actions */
.btn-admin { color: white; text-decoration: none; }
.btn-down, .btn-share { flex: 1; padding: 8px; text-decoration: none; color: white; border-radius: 4px; text-align: center; border:none; cursor:pointer; font-size: 0.9em;}
.btn-down { background: #27ae60; }
.btn-share { background: #2980b9; }
.btn-small { padding: 5px 10px; text-decoration: none; background: #95a5a6; color: white; border-radius: 3px; }
.delete { background: #e74c3c; }

/* Boutons Spéciaux */
.zip-btn { background: #8e44ad; } /* Violet */
.one-btn { background: #e67e22; } /* Orange */

/* Table Admin */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
th { background: #f8f9fa; color: #2c3e50; }
.hidden-row { background: #fff3cd; opacity: 0.7; }
.badge { padding: 4px 8px; border-radius: 12px; color: white; font-size: 0.75em; }
.badge.green { background: #2ecc71; }
.badge.red { background: #e74c3c; }

/* Login */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #dfe6e9; }
.login-box { background: white; padding: 40px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); text-align: center; width: 300px; }
.login-box input { width: 100%; padding: 10px; margin-bottom: 15px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; }

/* --- LIGHTBOX (ZOOM) --- */
.img-container {
    cursor: pointer; /* Petite main au survol */
    overflow: hidden;
    border-radius: 5px;
}
.img-container img {
    transition: transform 0.3s ease;
}
.img-container:hover img {
    transform: scale(1.05); /* Petit effet de zoom au survol */
}

.lightbox {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9); /* Fond noir sombre */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.btn-small.active {
    background: #333;
    font-weight: bold;
    border: 2px solid #000;
}
.nav-links { display: flex; gap: 10px; }

/* --- STYLE GÉNÉRAL (PC) --- */
body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; margin: 0; padding-bottom: 50px; }

/* Navigation */
nav { background: #2c3e50; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.logo { font-weight: bold; font-size: 1.4em; }
.nav-links { display: flex; gap: 10px; }

.container { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
.container-fluid { width: 95%; margin: 20px auto; }

/* Box Upload & Download */
.upload-box, .download-zone { background: white; padding: 25px; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 25px; }
.download-zone { border: 2px dashed #dfe6e9; background: #fafbfc; }
.btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 15px; flex-wrap: wrap; }

/* Inputs & Buttons */
input[type="file"] { margin: 15px 0; padding: 10px; border: 1px solid #ddd; border-radius: 5px; width: 100%; box-sizing: border-box; }
button { cursor: pointer; border: none; padding: 12px 24px; border-radius: 8px; font-size: 1em; font-weight: 600; transition: transform 0.1s; }
button:active { transform: scale(0.98); }
form button { background: #3498db; color: white; width: 100%; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.card { background: white; padding: 10px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; }
.img-container { height: 180px; overflow: hidden; border-radius: 8px; cursor: pointer; position: relative; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card:hover img { transform: scale(1.05); }

.actions { margin-top: 10px; display: flex; gap: 8px; }

/* Boutons Couleurs */
.btn-admin { color: white; text-decoration: none; background: rgba(255,255,255,0.1); padding: 8px 15px; border-radius: 20px; }
.btn-down { background: #27ae60; flex: 1; color: white; text-decoration: none; padding: 10px; border-radius: 6px; text-align: center; }
.btn-share { background: #2980b9; color: white; text-decoration: none; padding: 10px 20px; border-radius: 6px; display: inline-block; border: none; }
.btn-small { padding: 5px 12px; text-decoration: none; background: #ecf0f1; color: #2c3e50; border-radius: 15px; font-size: 0.9em; margin-left: 5px; }
.btn-small.active { background: #2c3e50; color: white; }
.zip-btn { background: #8e44ad; flex: 1; min-width: 140px; }
.one-btn { background: #e67e22; flex: 1; min-width: 140px; }

/* Lightbox (Zoom) */
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 1000; justify-content: center; align-items: center; }
.lightbox-content { max-width: 95%; max-height: 80vh; border-radius: 5px; }
.close-btn { position: absolute; top: 20px; right: 20px; color: white; font-size: 40px; cursor: pointer; padding: 10px; }

/* --- VERSION MOBILE (Téléphone) --- */
@media (max-width: 768px) {
    /* Menu : On simplifie */
    nav { flex-direction: column; gap: 10px; padding: 10px; }
    .nav-links { width: 100%; justify-content: space-around; }
    .btn-share, .btn-admin { font-size: 0.85em; padding: 8px 12px; }
    
    /* Container : Plus de marges énormes */
    .container { margin: 10px auto; padding: 0 10px; }
    
    /* Upload & Download : On empile tout */
    .upload-box, .download-zone { padding: 15px; }
    .btn-group { flex-direction: column; } /* Boutons l'un sous l'autre */
    .zip-btn, .one-btn { width: 100%; margin: 0; }
    
    /* Galerie : 2 colonnes au lieu de plein de petites */
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .img-container { height: 120px; } /* Images moins hautes */
    
    /* Boutons sous les images : Juste des icônes */
    .actions .btn-down, .actions .btn-share { padding: 8px; font-size: 1.2em; }
    
    /* Barre de tri : On la met en colonne */
    .container > div[style*="flex"] { flex-direction: column; align-items: flex-start; gap: 10px; }
}

    /* --- TABLEAU ADMIN (PC) --- */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.admin-table th { background: #f8f9fa; }
.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; }

/* --- ADMIN MOBILE (RESPONSIVE) --- */
@media (max-width: 768px) {
    /* On cache l'en-tête du tableau */
    .admin-table thead { display: none; }
    
    /* Chaque ligne devient un bloc (carte) */
    .admin-table tr { display: block; background: white; margin-bottom: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 15px; }
    
    /* Chaque cellule devient une ligne dans la carte */
    .admin-table td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; padding: 10px 0; }
    .admin-table td:last-child { border-bottom: none; }
    
    /* On ajoute le label (ex: "Info:") devant le contenu */
    .admin-table td::before { content: attr(data-label); font-weight: bold; color: #7f8c8d; margin-right: 10px; }
    
    /* Ajustements spécifiques */
    .thumb { width: 80px; height: 80px; }
    .admin-table td[data-label="Actions"] { flex-direction: row; justify-content: flex-end; gap: 10px; }
    .admin-table td[data-label="Actions"]::before { display: none; } /* Pas de label pour les boutons */
}


