:root {
    --bg-dark: #0f0f0f;
    --card-bg: #1e1e1e;
    --navbar-bg: #0f0f0f;
    --accent: #3d3d3d;
    --text-main: #f1f1f1;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: "Roboto", Arial, sans-serif;
    margin: 0;
}

.navbar {
    background: var(--navbar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    border-bottom: 1px solid #222;
    position: sticky; top: 0; z-index: 100;
}

.logo { font-size: 1.4rem; font-weight: 800; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 15px; }

.admin-login-btn {
    background: transparent; color: #aaa; border: 1px solid #333;
    padding: 8px 15px; border-radius: 20px; cursor: pointer;
}

.user-profile-header {
    display: flex; align-items: center; background: #222;
    padding: 5px 12px; border-radius: 25px; cursor: pointer;
}

.nav-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 10px; object-fit: cover; }
.nav-username { font-size: 0.9rem; margin-right: 10px; }
.logout-btn { background: transparent; color: #ff4d4d; border: none; font-size: 11px; cursor: pointer; }

/* Grille de posts */
.grid-container {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px; padding: 30px;
}
.post-card {
    background: var(--card-bg); border-radius: 12px; padding: 12px;
    cursor: pointer; border: 1px solid #222; transition: 0.2s;
}
.post-card:hover { background: #2a2a2a; }
.post-card img { width: 100%; border-radius: 8px; }

/* Modales */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
}
.modal-content {
    background: #0f0f0f; margin: 2% auto; padding: 30px;
    border-radius: 15px; width: 90%; max-width: 800px; position: relative;
    max-height: 90vh; overflow-y: auto; border: 1px solid #333;
}

/* Zone Commentaire Style YouTube */
.comment-placeholder {
    display: flex; align-items: center; gap: 15px;
    border-bottom: 1px solid #333; padding-bottom: 10px;
    margin-top: 20px; cursor: pointer; color: #aaa;
}
.comment-placeholder:hover { border-bottom: 1px solid #fff; }

.comment-avatar-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

#comment-input, .reply-input-field {
    width: 100%; background: transparent; border: none;
    border-bottom: 1px solid #333; color: white; padding: 5px 0;
    font-family: inherit; font-size: 1rem; resize: none;
}
#comment-input:focus, .reply-input-field:focus { outline: none; border-bottom: 2px solid white; }

.comment-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.send-comment-btn, .reply-btn { background: #3ea6ff; color: #000; padding: 6px 12px; font-weight: bold; border: none; border-radius: 15px; cursor: pointer;}
.cancel-btn { background: transparent; color: white; padding: 8px 16px; border: none; cursor: pointer;}

/* Menu Trois Points */
.comment-menu-container { position: relative; }
.menu-dots { background: transparent; color: #aaa; border: none; font-size: 1.2rem; cursor: pointer; padding: 0 5px; }
.comment-menu-dropdown {
    display: none; position: absolute; right: 0; top: 25px;
    background: #282828; border: 1px solid #444; border-radius: 8px;
    width: 120px; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.comment-menu-dropdown button {
    width: 100%; padding: 10px; background: transparent; color: white;
    border: none; text-align: left; cursor: pointer; font-size: 0.85rem;
}
.comment-menu-dropdown button:hover { background: #3f3f3f; }

/* Liste commentaires & Réponses */
.comment-item { display: flex; gap: 15px; margin-bottom: 25px; }
.comment-content h5 { margin: 0; font-size: 0.9rem; display: flex; align-items: center; }
.comment-date { font-size: 0.75rem; color: #717171; margin-left: 10px; }
.comment-actions { margin-top: 5px; }
.action-btn { background: transparent; color: #aaa; border: none; cursor: pointer; margin-right: 15px; font-size: 0.8rem; }

.replies-list { margin-left: 50px; margin-top: 15px; border-left: 2px solid #333; padding-left: 15px; }
.reply-item { display: flex; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; }
.reply-header { font-size: 0.8rem; color: #3ea6ff; }

.close { position: absolute; right: 20px; top: 15px; font-size: 28px; cursor: pointer; color: #fff; }
input[type="text"], input[type="password"] {
    width: 100%; padding: 12px; margin: 10px 0; background: #222;
    border: 1px solid #333; color: white; border-radius: 5px;
}
