:root {
    --primary: #0a66c2;
    --secondary: #ffb6c1;
    --bg: #f3f2ef;
    --text: #333;
    --card-bg: #fff;
    --nap-violet: #9370DB;
    --border: #e0e0e0;
    --nav-icon: #666;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

.hidden { display: none !important; }

/* HEADER ENRICHI */
header {
    background-color: var(--card-bg);
    padding: 5px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1128px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-search {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.logo img {
    height: 34px;
    border-radius: 4px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: none;
}

@media (min-width: 768px) {
    .logo-text { display: block; }
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #eef3f8;
    border-radius: 4px;
    padding: 0 10px;
    height: 34px;
    width: 280px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    width: 100%;
    font-size: 0.9em;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--nav-icon);
    font-size: 0.75em;
    gap: 4px;
    transition: color 0.2s;
}

.nav-item:hover { color: var(--text); }
.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.nav-avatar-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* CONTENEUR PRINCIPAL */
.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 3px rgba(0,0,0,0.04);
}

textarea#post-content {
    width: 100%;
    min-height: 60px;
    margin-bottom: 10px;
    border-radius: 24px;
    padding: 12px 20px;
    border: 1px solid #b5b5b5;
    resize: none;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.95em;
    outline-color: var(--primary);
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover { background-color: #004182; }

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: #eaf3ff;
    box-shadow: inset 0 0 0 1px var(--primary);
}

/* MODAL / POPUP HTML */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-weight: 800;
    font-size: 1.2em;
    margin-bottom: 12px;
    color: var(--primary);
}

.modal-body {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Post Styling */
.post-header { display: flex; align-items: center; gap: 20px; margin-bottom: 15px; }
.post-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 1px solid #eee; }
.post-info { display: flex; flex-direction: column; }
.post-author { font-weight: 800; font-size: 1.2em; color: var(--text); cursor: pointer; }
.post-author:hover { color: var(--primary); text-decoration: underline; }
.post-title { font-size: 0.9em; color: #666; display: block; }

.post-actions { display: flex; gap: 5px; margin-top: 15px; border-top: 1px solid #eee; padding-top: 5px; }
.action-btn { flex: 1; background: none; border: none; padding: 10px; cursor: pointer; font-weight: 600; color: #666; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.action-btn:hover { background-color: #f3f2ef; }

/* COMMENTS */
.comment-section {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-bubble {
    background: #f3f2ef;
    padding: 8px 12px;
    border-radius: 0 12px 12px 12px;
    flex: 1;
    font-size: 0.9em;
}

.comment-author {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.load-more-comments {
    background: none;
    border: none;
    color: #666;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 0;
    font-size: 0.85em;
}

.load-more-comments:hover { text-decoration: underline; color: var(--primary); }

/* Profile specific */
.profile-header {
    text-align: left; /* Justifié à gauche */
}

.profile-cover {
    height: 200px;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    background-image: url('../img/banner.jpg');
    background-size: cover;
    background-position: center;
    margin: -20px -20px 0 -20px;
    border-radius: 12px 12px 0 0;
}

.avatar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -100px;
    margin-left: 20px; /* Décalé du bord */
    width: fit-content;
}

.profile-avatar-large {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid white;
    background: white;
    object-fit: cover;
    z-index: 2; /* S'assure qu'elle reste au-dessus du fond */
}

.open-to-nap {
    margin-top: 10px; /* Espace sous la photo */
    background: var(--nap-violet);
    color: white;
    padding: 4px 16px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-info-block {
    padding: 0 20px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-start; /* Justifié à gauche */
}

.skill-tag {
    display: inline-block;
    background: #fce8f3;
    color: #d11182;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    margin: 0 8px 8px 0;
    border: 1px solid #f9c2d1;
}
