/* ============================================================
   ESBAACE CORE STYLE - REFONTE MODERNE & FUTURISTE
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* Palette Esbaace Modernisée */
    --primary-color: #5b8c3a;
    --primary-glow: rgba(91, 140, 58, 0.2);
    --secondary-color: #4a2e1a; /* Marron profond */
    --accent-color: #ffd700; /* Or pour les éléments "Premium" */
    
    /* Backgrounds & Glassmorphism */
    --main-bg: #f0f4f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --block-bg: #ffffff;
    
    /* Textes */
    --text-main: #1a3c1e;
    --text-muted: #667c68;
    
    /* Bordures & Ombres */
    --border-color: rgba(179, 201, 161, 0.5);
    --soft-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --inner-glow: inset 0 0 10px rgba(255, 255, 255, 0.5);
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--main-bg);
    /* Dégradé futuriste très léger */
    background-image: 
        radial-gradient(at 0% 0%, rgba(91, 140, 58, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(74, 46, 26, 0.05) 0px, transparent 50%);
    font-family: 'Roboto', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

/* --- STRUCTURE PRINCIPALE --- */
.bloc_principal {
    display: grid;
    grid-template-columns: 260px 1fr 300px; /* Layout 3 colonnes fixe */
    gap: 24px;
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 20px;
    min-height: calc(100vh - 120px);
}

/* Sections latérales fixes */
aside, .right_section {
    position: sticky;
    top: 85px; /* Ajusté selon la hauteur de votre header */
    height: fit-content;
}

/* --- COMPOSANTS DE LA PAGE ACCUEIL --- */

/* Onglets du flux (Feed Tabs) */
.feed-tabs {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 3px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.feed-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.feed-tab.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.feed-tab:hover:not(.active) {
    background: rgba(91, 140, 58, 0.1);
    color: var(--primary-color);
}

/* Blocs de droite (Pubs & Membres) */
.ad_banner, .new_member {
    background: var(--block-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease;
}

.ad_banner:hover {
    transform: translateY(-5px);
}

.new_member p {
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--main-bg);
    padding-bottom: 10px;
}

.see-all-link {
    font-size: 0.8em;
    color: var(--primary-color);
    text-decoration: none;
    background: var(--primary-glow);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Liste des nouveaux membres */
.new_member table {
    width: 100%;
    border-spacing: 0 10px;
}

.new_member td {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
}

.new_member img.previewable {
    width: 48px;
    height: 48px;
    border-radius: 12px; /* Carré arrondi plus moderne que le cercle pur */
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.new_member a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95em;
}

.new_member em {
    display: block;
    font-style: normal;
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- RESPONSIVE --- */

@media (max-width: 1100px) {
    .bloc_principal {
        grid-template-columns: 240px 1fr; /* On cache ou déplace la colonne droite */
    }
    .right_section {
        display: none;
    }
}

@media (max-width: 768px) {
    .bloc_principal {
        grid-template-columns: 1fr;
        margin-top: 10px;
        padding: 0 15px;
    }
    
    aside {
        display: none; /* Menu burger géré par le header */
    }
}

/* --- UTILITAIRES --- */
.loader {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
    font-weight: 500;
}

.separateur {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 5px 0;
}

/* --- HEADER MODERNE --- */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
	height: 100%;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo_lien img {
    height: 42px; /* Taille fixe pour éviter le débordement */
    width: auto;
    transition: transform 0.3s ease;
}

/* Barre de recherche futuriste */
.bar_recherche {
    flex: 0 1 500px;
    display: flex;
    background: var(--main-bg);
    border-radius: 50px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin: 0 20px;
}

.bar_recherche:focus-within {
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-glow);
    border-color: var(--primary-color);
}

.bar_recherche input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 15px;
    outline: none;
    font-size: 0.95em;
    color: var(--text-main);
}

.bar_recherche input[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.3s;
}

.profile-dropdown, .notifications .dropdown {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 60px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    min-width: 170px;
    overflow: hidden; /* Pour les coins arrondis des liens */
    z-index: 2000;
}

.profile-dropdown {
    display: none;
    flex-direction: column;
	width: 60%;
}

.profile-dropdown.active {
    display: flex !important;
}

.menu_lien .profile-dropdown a {
    display: flex;
    align-items: center;	
    gap: 10px;
    font-size: 0.90rem;
    transition: background 0.2s;
	text-decoration: none;
}

/* Classe active pour JS */
.notifications .dropdown.active {
    display: block !important;
}

/* Menu icônes */
.menu_lien {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu_lien a, .notifications button.icon {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu_lien a:hover, .notifications button.icon:hover {
    color: var(--primary-color);
    background: var(--primary-glow);
}

/* Badges de notifications */
.notif {
    position: absolute;
    top: 6px;
    right: 5px;
    background: #ff4d4d;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.notifications .notif {
	top: 2px !important;
}

.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-container img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0; /* Empêche l'image de s'écraser */
    border: 2px solid var(--primary-color);
}

/* --- ASIDE : SECTION PROFIL & NAV --- */
.left_section {
    background: var(--block-bg);
    border-radius: 16px;
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
	max-width: 260px;
    overflow: hidden;
}

.profil_section {
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--main-bg);
}

.profil_section img {
    width: 65px;
    height: 65px;
    border-radius: 22px; /* Style "Squircle" */
    object-fit: cover;
    margin-bottom: 5px;
    border: 2px solid var(--main-bg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.info_profil strong {
    font-size: 1em;
    color: var(--text-main);
    display: block;
}

.info_profil a {
    text-decoration: none !important; /* Retire le soulignement */
    color: inherit;
    display: block;
}

.info_profil strong:hover {
    color: var(--primary-color);
}

.info_profil em {
    font-style: normal;
    font-size: 0.8em;
    color: var(--text-muted);
}

.nav_bar ul {
    list-style: none;
}

.nav_bar li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 10px;
    font-size: 0.80rem; /* Texte légèrement plus petit pour tout faire tenir */
    margin-bottom: 2px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav_bar li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.nav_bar li a:hover, .nav_bar li a.active {
    background: var(--primary-glow);
    color: var(--primary-color);
}

.nav_bar li a.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.right_section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.new_member {
    max-height: 500px; /* Limite la hauteur si trop de membres */
    overflow-y: auto; /* Ajoute un scroll interne si besoin */
}

/* --- FIX GLOBAL IMAGES --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- FOOTER --- */
.footer_section {
    display: block;
    width: 100%;
    margin-top: auto; /* Pousse le footer vers le bas */
    padding-bottom: 20px;
}

.footer-main {
    text-align: center;
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: #fff;
    border-top: 1px solid var(--border-color);
	border-radius: 12px;
    margin-top: 20px;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
	flex-direction: column;
    gap: 5px;
    list-style: none;
    margin-bottom: 15px;
}

.footer-nav a {
    font-size: 0.8em;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.75em;
    color: var(--text-muted);
    opacity: 0.8;
}

/* --- RETOUR AU STYLE LIGHTBOX ORIGINAL & FIXES --- */

#global-lightbox-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(12px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.lightbox-hidden {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* L'overlay reste derrière tout */
.lightbox-overlay {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
    z-index: 1;
}

/* --- LE CONTENEUR D'IMAGE RÉDUIT --- */
.lightbox-content {
    position: relative;
    z-index: 10;
    display: flex !important;
    align-items: center;
    justify-content: center;
    /* On ne force plus 100% ici pour que l'image soit le maître */
    max-width: 90vw;
    max-height: 85vh;
    pointer-events: none;
}

#lightbox-img {
    max-width: 100% !important; /* L'image s'adapte au content */
    max-height: 85vh !important;
    object-fit: contain;
    pointer-events: auto !important;
    border-radius: 12px; /* Arrondis plus modernes */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); /* Ombre portée douce et profonde */
    background-color: rgba(255, 255, 255, 0.05); /* Fond très léger si l'image a de la transparence */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox-hidden #lightbox-img {
    transform: scale(0.9) translateY(20px); /* Effet d'entrée par le bas et zoom */
}

/* --- BOUTONS DE NAVIGATION MODERNE --- */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000002;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.lightbox-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.lightbox-nav-btn.prev { left: 30px; }
.lightbox-nav-btn.next { right: 30px; }

/* --- BARRE D'OUTILS (TOP) --- */
.lightbox-toolbar {
    position: absolute;
    top: 25px;
    right: 30px;
    z-index: 1000005;
    display: flex;
    align-items: center;
    gap: 20px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.lightbox-btn:hover {
    background: #ff4d4d; /* Rouge pour la fermeture */
    transform: rotate(90deg);
}

/* --- SECTION PUBLICITAIRE (RIGHT COLUMN) --- */
.pub-section {
    width: 100%;
    overflow: hidden;
}

.no-pub {
    font-size: 0.85em;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 10px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.pub-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    transition: transform 0.3s ease;
}

.pub-item:hover img {
    transform: scale(1.02);
}

/* --- LE FEED (POSTS) --- */
.post {
    background: var(--block-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
    transition: box-shadow 0.3s ease;
}

.post:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

/* En-tête du post */
.post .offre_profil {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.post .offre_profil img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

.post .offre_profil a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

.post .offre_profil em {
    display: block;
    font-style: normal;
    font-size: 0.8em;
    color: var(--text-muted);
    font-weight: 400;
}

/* Badges de Type (Actualité, Emploi, etc.) */
.type-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
}

.type-badge.actualite { background: #e3f2fd; color: #1976d2; }
.type-badge.baara { background: #e8f5e9; color: #2e7d32; }
.type-badge.sugu { background: #fff8e1; color: #f9a825; }
.type-badge.offre_emploi { background: #ffebee; color: #c62828; }
.type-badge.appel_offre { background: #0A94FF; color: #054A80; }
.type-badge.opportunite_affaires { background: #7766FF; color: #3C3380; }

/* --- 3. STYLE DU TITRE DE PUBLICATION (FEED) --- */
.post .titre_offre, .post .titre_offre a {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    margin: 10px 0;
    display: block;
    line-height: 1.3;
}

.post .titre_offre a:hover {
    color: var(--primary-color);
}

.post .contenu_offre {
    font-size: 0.95em;
    color: #444;
    margin-bottom: 15px;
    white-space: pre-line; /* Respecte les retours à la ligne */
}

/* Grille d'images dans les posts */
.media-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
}

.media-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* --- ACTIONS (LIKE, COMMENT, SHARE) --- */
.post .actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--main-bg);
}

.post .actions span, .share-btn, .like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.post .actions span:hover, .like-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.like-btn.liked i {
    color: #e74c3c;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* --- SECTION COMMENTAIRES --- */
.comments {
    margin-top: 20px;
    background: var(--main-bg);
    border-radius: 12px;
    padding: 15px;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comments textarea {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    resize: none;
    font-family: inherit;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.3s;
}

.comments textarea:focus {
    border-color: var(--primary-color);
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.comment:last-child { border-bottom: none; }

.comment .author {
    font-weight: 700;
    font-size: 0.9em;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.comment p {
    font-size: 0.9em;
    color: #444;
}

.delete-comment-btn {
    color: #b0bec5;
    font-size: 0.8em;
    transition: color 0.2s;
}

.delete-comment-btn:hover { color: #e74c3c; }

/* Notification spécifique à la nav_bar */
.notif_nav {
    background: #ff4d4d;
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: auto; /* Aligne à droite dans le lien flex */
}

/* Affichage des items de liste */
.nav_bar ul#menu_nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav_bar ul#menu_nav li {
    width: 100%;
}

/* Masquer le toggle sur desktop s'il n'est pas nécessaire */
@media (min-width: 769px) {
    .nav_bar .menu-toggle {
        display: none;
    }
    .nav_bar .menu-container {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* --- 1. VISIBILITÉ DES COLONNES (STAY VISIBLE) --- */
/* On s'assure que les colonnes latérales restent en vue sans attendre la fin du feed */
aside, .right_section {
    position: sticky;
    top: 90px; /* Aligné sous le header */
    height: calc(100vh - 110px); /* Hauteur dynamique selon l'écran */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Permet de scroller l'intérieur de la colonne si elle est longue */
    scrollbar-width: none; /* Cache la barre de scroll pour un look épuré */
}

aside::-webkit-scrollbar, .right_section::-webkit-scrollbar {
    display: none;
}

/* --- 4. OPTIMISATION DROPDOWNS & NOTIFICATIONS --- */
.notifications .dropdown a {
    padding: 8px 15px; /* Plus compact */
    font-size: 0.85rem; /* Texte plus petit */
}

/* Style spécifique pour les notifications injectées par JS */
.notif-item {
    display: flex;
    align-items: center;
    gap: 12px !important;
    padding: 10px !important;
    border-bottom: 1px solid var(--main-bg);
}

.notif-item img {
    width: 35px !important;
    height: 35px !important;
}

.notif-item p {
    font-size: 0.85rem !important;
    color: var(--text-main);
}

.notif-item small {
    font-size: 0.7rem !important;
}

/* Limitation de l'espace des notifications */
.notifications .dropdown {
    max-height: 450px;
    width: 320px; /* Plus proche du design original */
    overflow-y: auto;
}

/* --- 5. FIX RIGHT SECTION (MEMBRES & FOOTER) --- */
.new_member {
    max-height: none; /* On laisse le sticky de la colonne gérer */
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE DESIGN - OPTIMISATION MOBILE & TABLETTE
   ============================================================ */

@media (max-width: 1024px) {
    .bloc_principal {
        grid-template-columns: 240px 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    .right_section {
        display: none;
    }
}

@media (max-width: 768px) {
    /* 1. Correction du Layout : On retire le grid qui bloque le clic */
    .bloc_principal {
        display: block !important; 
        margin-top: 0 !important;
        padding: 10px !important;
        min-height: auto !important;
    }
	
	body.modal-open {
        overflow: hidden !important;
        height: 100vh !important;
    }
	
	#global-lightbox-modal {
        height: 110vh !important;
        top: 0 !important;
    }

    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.5); /* Plus sombre sur mobile */
    }

    .lightbox-nav-btn.prev { left: 10px; }
    .lightbox-nav-btn.next { right: 10px; }

    .lightbox-toolbar {
        top: 15px;
        right: 15px;
    }

    #lightbox-img {
        max-width: 95% !important;
    }

    /* 2. Correction de l'espace vide sous le header */
    aside, .right_section {
        position: relative !important; /* On retire le sticky sur mobile */
        top: 0 !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 5px;
        box-shadow: none !important;
    }

    /* 3. Affichage du Menu Hamburger et de la Nav_Bar sur Mobile */
    aside.left_section {
        display: block !important; /* On l'affiche pour voir le menu hamburger */
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }

    .profil_section {
        display: none; /* On cache la section profil sur mobile pour gagner de la place */
    }

    .nav_bar .menu-toggle {
        display: flex !important; /* Force l'apparition du hamburger */
        background: var(--block-bg);
        border: 1px solid var(--border-color);
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 5px;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    /* Le menu lui-même reste caché jusqu'au clic (géré par votre JS) */
    .nav_bar .menu-container {
        display: none; 
    }
    .nav_bar .menu-container.menu-open {
        display: block !important;
        background: var(--block-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 10px;
    }

    /* 4. Libération du flux central (Feed) */
    .center_section {
        width: 100% !important;
        padding: 0 !important;
        pointer-events: auto !important; /* Assure que le clic fonctionne */
		position: relative;
        z-index: 1 !important;
    }

    /* 5. Header Mobile Compact */
    header {
        height: auto !important;
        padding: 8px 0 !important;
    }

    .header-container {
        flex-wrap: wrap;
        gap: 8px;
    }

    .bar_recherche {
        order: 3;
        flex: 1 1 100%;
        margin: 5px 0 !important;
		width: 100%;
        box-sizing: border-box;
    }
	
	.bar_recherche input[type="search"] {
        padding: 10px; /* Plus confortable au doigt */
        font-size: 16px !important; /* Empêche le zoom auto sur iPhone au clic */
    }

    .bar_recherche input[type="submit"] {
        padding: 8px 10px;
    }

    .logo_lien img {
        height: 32px;
    }

    /* 6. Tabs du Feed Mobile */
    .feed-tabs {
        position: sticky;
        top: 0; /* Colle au sommet du scroll mobile */
        z-index: 100;
        margin-top: 5px;
    }

    /* 7. Posts Mobile */
    .post {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .media-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- FIX GLOBAL POUR LE CLIC --- */
/* On s'assure que rien ne recouvre le contenu par erreur */
.center_section, #posts-container {
    position: relative;
    z-index: 1;
}

/* ============================================================
   PAGE PROFIL - DESIGN PREMIUM & BRANDING
   ============================================================ */

/* --- ENTETE DE PROFIL (HERO SECTION) --- */
.entete_pview {
    background: var(--block-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
    position: relative;
    overflow: hidden;
}

/* Effet de fond décoratif subtil pour le profil */
.entete_pview::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 100px;
    background: linear-gradient(135deg, var(--primary-glow), transparent);
    z-index: 0;
}

.profil_view {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profil_pic {
    width: 140px;
    height: 140px;
    border-radius: 30px; /* Style Squircle prononcé */
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Infos Textuelles */
.profil_view ul {
    list-style: none;
    flex: 1;
}

.nom_profil_Pview {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.verified-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
    background-color: var(--primary-color);
}

.profil_view li em {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-style: normal;
    font-weight: 500;
}

.profil_view p {
    font-size: 0.95rem;
    margin-top: 5px;
    color: var(--text-muted);
}

/* Actions de Profil */
.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-suivre, .btn-contacter, .btn-edit-profil, .btn-report {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-suivre { background: var(--primary-color); color: #fff; }
.btn-suivre.unfollow { background: var(--main-bg); color: var(--text-main); }
.btn-contacter { background: var(--primary-glow); color: var(--primary-color); }
.btn-edit-profil { background: var(--secondary-color); color: #fff; }

.btn-suivre:hover, .btn-contacter:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Statistiques Suiveurs */
.suivis_section {
    display: flex;
    gap: 30px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--main-bg);
}

.suivis_section p {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.suivis_section p strong {
    color: var(--text-main);
    font-size: 1.1rem;
}

.suivis_section p:hover { color: var(--primary-color); }

/* --- DETAILS DU PROFIL (BLOCS D'INFOS) --- */
.details_profil fieldset {
    background: var(--block-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--soft-shadow);
}

.details_profil legend, .last_post legend {
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details_profil p {
    color: var(--text-main);
    line-height: 1.7;
}

/* --- OEUVRES & RÉALISATIONS --- */
.oeuvres-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.oeuvres-item {
    background: var(--main-bg);
    padding: 10px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.oeuvres-item:hover { transform: translateY(-5px); }

.oeuvres-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.oeuvres-caption {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.oeuvres-delete {
    background: #ff4d4d15;
    color: #ff4d4d;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
}

/* --- 1. STYLISATION DU FORMULAIRE D'UPLOAD (OEUVRES) --- */
#oeuvres-upload-form {
    background: var(--main-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px dashed var(--border-color);
}

#oeuvres-upload-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#oeuvres-upload-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Champ description (caption) */
#oeuvres-caption {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#oeuvres-caption:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Bouton Télécharger */
#oeuvres-upload-form .btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start; /* Ne prend pas toute la largeur */
    display: flex;
    align-items: center;
    gap: 8px;
}

#oeuvres-upload-form .btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Responsive Profil Mobile */
@media (max-width: 768px) {
    .profil_view {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .profil_pic {
        width: 110px;
        height: 110px;
    }
    
    .nom_profil_Pview {
        font-size: 1.4rem;
        justify-content: center;
    }
    
    .suivis_section {
        justify-content: center;
        gap: 15px;
    }
}

/* --- 1. FIX ENTÊTE PROFIL (PC & ESPACEMENT) --- */
@media (min-width: 1025px) {
    .profil_view {
        display: grid;
        grid-template-columns: 140px 1fr auto; /* 3 colonnes : Photo | Infos | Actions */
        align-items: flex-start;
        gap: 30px;
        width: 100%;
    }

    .profile-actions {
        display: flex;
        flex-direction: column; /* Passage en vertical sur PC */
        gap: 10px;
        min-width: 120px; /* Largeur fixe pour stabiliser la colonne de droite */
        padding-left: 07px;
        border-left: 1px solid var(--main-bg);
    }
}

/* Transformation des boutons en mode iconique/compact sur PC */
.profile-actions button, .profile-actions a {
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: 12px;
}

/* Style spécifique pour les boutons icônes du JS */
.profile-actions .btn-suivre i, 
.profile-actions .btn-contacter i {
    font-size: 1.2rem;
}

/* --- 2. STYLE DES DERNIÈRES PUBLICATIONS (last_post) --- */
.last_post fieldset {
    border: 1px solid var(--border-color);
    background: var(--block-bg);
    border-radius: 16px;
    padding: 20px;
    margin-top: 25px;
}

#last-posts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- OPTIMISATION DES DERNIÈRES PUBLICATIONS SUR PROFIL --- */

#last-posts-container .post {
    max-height: 400px; /* Hauteur limite pour ne pas allonger le profil */
    overflow: hidden;
    position: relative;
    padding-bottom: 60px; /* Espace réservé pour les actions en bas */
    border-bottom: 2px solid var(--main-bg);
}

/* Effet de fondu pour indiquer qu'il y a une suite */
#last-posts-container .post::after {
    content: "";
    position: absolute;
    bottom: 55px; /* S'arrête juste au-dessus de la barre d'actions */
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--block-bg));
    pointer-events: none; /* Ne bloque pas le clic sur les liens */
}

/* --- MAINTIEN DU COMPTEUR DE VUES ET DES ACTIONS --- */
#last-posts-container .post .actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--block-bg); /* Fond opaque pour être toujours lisible */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--main-bg);
    z-index: 2;
}

/* Style spécifique pour le compteur de vues (Eye icon) */
.click-count {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.click-count i {
    font-size: 1rem;
}

/* Style des liens d'offres dans le mini-flux */
.offer-link {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    margin: 10px 0;
    display: block;
    line-height: 1.3;
}

.offer-link:hover {
    color: var(--primary-color);
}

/* --- 3. MODALES (SIGNALEMENT & SUIVIS) --- */
#report-modal, #follow-modal {
    position: fixed;
    inset: 0;
    z-index: 10001; /* Au-dessus du header */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none; /* Flex via JS */
    align-items: center;
    justify-content: center;
}

#report-form, #follow-content {
    background: #fff;
    border-radius: 24px;
    padding: 35px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Tabs dans la modale suivis */
.follow-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--main-bg);
    padding: 5px;
    border-radius: 12px;
}

.follow-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.follow-tab.active {
    background: var(--primary-color);
    color: #fff;
}

/* Liste des utilisateurs dans la modale */
.follow-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--main-bg);
}

.follow-item img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

.follow-item .info a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
}

.follow-item .activity {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Boutons dans les modales */
#report-form button, .pagination button, .close-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

#report-form button[type="submit"] {
    background: var(--primary-color);
    color: white;
    width: 100%;
    margin-top: 15px;
}

.close-btn {
    background: var(--main-bg);
    color: var(--text-muted);
    width: 100%;
    margin-top: 10px;
}

.close-btn:hover { background: #fee2e2; color: #ef4444; }

/* Champs du formulaire de signalement */
#report-form select, #report-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin: 10px 0;
    font-family: inherit;
    outline: none;
}

#report-form select:focus, #report-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============================================================
   PAGE MODIFICATION PROFIL - UX & FORMULAIRES
   ============================================================ */

/* Conteneur spécifique pour l'édition */
main.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

main.container h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-align: center;
}

/* --- SECTIONS DU FORMULAIRE --- */
.form-section {
    background: var(--block-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.form-section h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- GROUPES DE CHAMPS --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Style des inputs, selects et textareas */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--main-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Inputs désactivés (Email/Tel) */
.form-group input:disabled {
    background: #e9ece9;
    color: #888;
    cursor: not-allowed;
    border-style: dashed;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* --- GESTION DE LA PHOTO DE PROFIL --- */
.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 25px;
    object-fit: cover;
    margin: 15px 0;
    border: 3px solid var(--primary-glow);
    display: block;
}

/* --- LISTE DES LANGUES (CHECKBOXES) --- */
.langues-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    background: var(--main-bg);
    padding: 20px;
    border-radius: 12px;
}

.langues-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

.langues-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* --- MESSAGES D'ALERTE --- */
.form-message .success, 
.form-message .error, 
.form-message .warning {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    text-align: center;
}

.form-message .success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.form-message .error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.form-message .warning { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; }

/* --- BOUTON FLOTTANT D'ENREGISTREMENT --- */
.floating-submit {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(91, 140, 58, 0.4);
    transition: all 0.3s ease;
    z-index: 900;
}

.floating-submit:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.floating-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- FOOTER PARAMÈTRES --- */
.footer_param-search {
    margin-top: 50px;
    padding: 20px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
    }
    
    .floating-submit {
        bottom: 20px;
        right: 20px;
        left: 20px; /* Prend toute la largeur sur mobile */
        width: calc(100% - 40px);
        text-align: center;
    }
}

/* ============================================================
   MES PUBLICATIONS - STUDIO DE CRÉATION & DASHBOARD
   ============================================================ */

/* --- 1. CONTRÔLES DE HAUT DE PAGE --- */
.post-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    background: var(--glass-bg);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

#new-post-btn {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

#archives-btn {
    background: var(--secondary-color);
    color: #fff;
}

.btn-action:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

/* --- 2. FORMULAIRE DE NOUVELLE PUBLICATION --- */
.new_post {
    background: var(--block-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.new_post h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-bg);
}

/* Style des labels et champs spécifiques au formulaire */
.new_post label {
    display: block;
    font-weight: 600;
    margin: 15px 0 8px 0;
    color: var(--text-main);
    font-size: 0.9rem;
}

.new_post input[type="text"],
.new_post input[type="number"],
.new_post input[type="date"],
.new_post input[type="email"],
.new_post input[type="tel"],
.new_post select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--main-bg);
    outline: none;
    transition: all 0.3s;
}

.new_post input:focus, .new_post select:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
/* --- 1. RENDU DU MICRO D'ENREGISTREMENT --- */
.audio-recorder {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* Le bouton central du micro */
.btn-record {
    width: 80px !important;
    height: 80px !important;
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    border: 5px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.4) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-record i {
    font-size: 2rem;
    color: white;
}

.btn-record:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(255, 71, 87, 0.6) !important;
}

/* État d'enregistrement actif */
.btn-record.recording {
    background: #ff0000 !important;
    animation: pulseRecording 1.2s infinite;
    border-color: white !important;
}

@keyframes pulseRecording {
    0% { transform: scale(1); box-shadow: 0 0 0 0px rgba(255, 0, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0px rgba(255, 0, 0, 0); }
}

/* --- 2. STYLISATION DES ACTIONS DE POST (VOIR, MODIFIER, ARCHIVER) --- */
/* On cible les liens à l'intérieur du paragraphe d'action du JS */
.ipost .post p:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--main-bg);
}

/* Style de base des boutons d'action (Liens transformés) */
.ipost .post p:last-child a {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Bouton "Voir" */
.ipost .post p:last-child a[href*="/offre/"] {
    background: var(--primary-glow);
    color: var(--primary-color);
}

.ipost .post p:last-child a[href*="/offre/"]:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Bouton "Modifier" */
.ipost .post p:last-child a[href*="/post/edit/"] {
    background: #e3f2fd;
    color: #1976d2;
}

.ipost .post p:last-child a[href*="/post/edit/"]:hover {
    background: #1976d2;
    color: #fff;
}

/* Bouton "Archiver" */
.ipost .post p:last-child a[href*="/post/archive/"] {
    background: #f5f5f5;
    color: #616161;
}

.ipost .post p:last-child a[href*="/post/archive/"]:hover {
    background: #424242;
    color: #fff;
}

/* Style pour le bouton "Booster" spécifique */
.ipost .post button[data-action="boost-post"] {
    background: linear-gradient(135deg, #d4af37, #f1c40f) !important;
    color: #1a3c1e !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3) !important;
    font-size: 0.85rem !important;
}

.ipost .post button[data-action="boost-post"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5) !important;
}

/* Badge Boost Actif */
.ipost .post span i.fa-check-circle {
    margin-right: 5px;
}

/* --- 4. BLOCS SPÉCIFIQUES (BAARA, EMPLOI, ETC.) --- */
.extra-fields {
    background: #f8faf8;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 5px solid var(--primary-color);
    display: none; /* Géré par JS */
}

.candidature-block {
    background: var(--primary-glow) !important;
    border-left: 4px solid var(--primary-color) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    margin-top: 20px !important;
}

/* --- 5. ÉDITEUR QUILL & PREVIEW IMAGES --- */
#contenu-editor {
    border-radius: 10px;
    border: 1px solid var(--border-color) !important;
    overflow: hidden;
}

.ql-toolbar {
    background: #f1f1f1;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border: none !important;
}

/* Bouton Publier final */
#submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px var(--primary-glow);
    transition: all 0.3s;
}

#submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .post-controls {
        flex-direction: column;
    }
    
    .new_post {
        padding: 20px;
    }
}

/* ============================================================
   PAGE ÉDITION PUBLICATION - REFONTE CORRIGÉE
   ============================================================ */

.edit_post {
    background: var(--block-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.edit_post h3 {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-bg);
}

/* --- 1 & 2. STYLISATION DES LABELS ET INPUTS (FIX ALIGNEMENT) --- */
.edit_post label {
    display: block; /* Force le retour à la ligne pour chaque label */
    width: 100%;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit_post input[type="text"],
.edit_post input[type="number"],
.edit_post input[type="date"],
.edit_post input[type="email"],
.edit_post input[type="tel"],
.edit_post select,
.edit_post textarea {
    width: 100%;
    display: block;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--main-bg);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

/* État Focus pour tous les champs */
.edit_post input:focus, 
.edit_post select:focus, 
.edit_post textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* --- STYLE SPÉCIFIQUE TYPE (DÉSACTIVÉ) --- */
.edit_post select#type:disabled {
    background: #f0f0f0;
    color: #888;
    border-style: dashed;
    cursor: not-allowed;
    -webkit-appearance: none; /* Retire la flèche sur certains navigateurs */
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-style: italic;
}

/* --- 3. CORRECTION DU BLOC CONTENU --- */
#contenu-editor {
    margin-top: 5px;
    border-radius: 0 0 10px 10px;
    border: 1px solid var(--border-color) !important;
    background: white;
}

/* --- 4. STYLISATION DES EXTRA-FIELDS --- */
.extra-fields {
    background: #f9fbf9;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border: 1px solid var(--border-color);
    border-left: 6px solid var(--primary-color); /* Rappel visuel Esbaace */
}

/* Titres ou labels à l'intérieur des extra-fields */
.extra-fields label {
    margin-top: 15px;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.extra-fields label:first-of-type {
    margin-top: 0;
}

/* Case à cocher Urgence */
.extra-fields label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: none;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* --- GESTION DES MÉDIAS & PDF --- */
.image-preview {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
    padding: 10px;
    background: var(--main-bg);
    border-radius: 10px;
}

.image-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--primary-glow);
}

/* Bouton Enregistrer */
#submit-btn.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

/* ============================================================
   PAGES ARCHIVES - CONFIRMATION ET GESTION
   ============================================================ */

/* --- 1. PAGE DE CONFIRMATION D'ARCHIVAGE (archive_post) --- */
.archive_post {
    background: var(--block-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.archive_post h3 {
    color: #dc3545; /* Couleur d'alerte pour l'action critique */
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.archive_post p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 30px;
    line-height: 1.6;
}

.archive_post p strong {
    color: var(--secondary-color);
}

/* Boutons de confirmation d'archive */
#archive-post-form {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #bd2130;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.archive_post button.cancel {
    background: var(--main-bg);
    color: var(--text-muted);
    padding: 12px 25px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.archive_post button.cancel:hover {
    background: #eee;
    color: var(--text-main);
}

/* --- 2. PAGE LISTE DES ARCHIVES (archives) --- */
.archives h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 25px;
    padding-left: 10px;
    border-left: 5px solid var(--primary-color);
}

#archives-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Style des publications dans les archives (plus compact) */
.archives .post {
    opacity: 0.85; /* Aspect légèrement estompé pour indiquer l'archivage */
    border-style: dashed; /* Bordure pointillée pour différencier des posts actifs */
    transition: opacity 0.3s, transform 0.3s;
}

.archives .post:hover {
    opacity: 1;
    transform: scale(1.01);
}

/* --- 3. MODALE DE CONFIRMATION (RESTAURATION / SUPPRESSION) --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex; /* Géré par JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
    margin-bottom: 15px;
    color: var(--text-main);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: center;
}

.modal-confirm, .modal-cancel {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    min-width: 120px;
}

.modal-confirm {
    background: var(--primary-color);
    color: white;
}

.modal-cancel {
    background: var(--main-bg);
    color: var(--text-muted);
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    font-weight: 500;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   PAGES ABOUT / CGU / CONTACT - DESIGN INSTITUTIONNEL
   ============================================================ */

/* --- 1. HEADER SPÉCIFIQUE ABOUT --- */
.about-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

/* On force le container à utiliser tout l'espace disponible */
.about-header .container {
    max-width: 1200px; /* Ou votre largeur max globale */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between; /* LOGO à GAUCHE <----> LE RESTE à DROITE */
    align-items: center;
    width: 100%;
}

.header-content .logo {
    margin-right: auto; /* Pousse tout ce qui suit vers la DROITE */
}

.header-content .logo img {
    height: 45px;
    width: auto;
    display: block;
}

.account-link {
    background: var(--primary-glow);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    white-space: nowrap;
    display: inline-block;
    margin-left: 20px; /* Espace minimal avec le logo */
}

.account-link:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- 2. LAYOUT ABOUT --- */
.about-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* Sidebar Navigation */
.about-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
}

.nav-about {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
}

.nav-about li a {
    display: block;
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.nav-about li a:hover {
    background: var(--main-bg);
    color: var(--primary-color);
}

.nav-about li a.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* --- 3. CONTENU TEXTUEL (MAIN) --- */
.about-main {
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--soft-shadow);
    line-height: 1.8;
}

.about-main h1 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.about-main h2 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin: 35px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--main-bg);
}

.about-main p {
    margin-bottom: 20px;
    color: #4a5568;
}

.about-main ul, .about-main ol {
    padding-left: 20px;
    margin-bottom: 25px;
}

.about-main li {
    margin-bottom: 12px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.italic {
    display: block;
    background: var(--main-bg);
    padding: 15px;
    border-radius: 12px;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    margin: 10px 0;
}

/* --- 4. FORMULAIRE DE CONTACT --- */
.contact-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.contact-info {
    background: linear-gradient(135deg, #f8faf8 0%, #eef5e9 100%);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    background: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    font-family: inherit;
    font-size: 1rem;
    margin-top: 8px;
    transition: 0.3s;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
}

.contact-form .btn-primary {
    background: var(--primary-color) !important; /* Force le vert Esbaace */
    color: #ffffff !important;
    border: none !important;
    padding: 14px 30px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    width: auto !important; /* Ne prend pas toute la largeur par défaut */
    min-width: 150px;
    margin-top: 15px;
    box-shadow: 0 6px 20px var(--primary-glow) !important;
    transition: all 0.3s ease !important;
}

.contact-form .btn-primary:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.header-right-side .menu-toggle {
    display: none; /* Masqué par défaut sur écran large */
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 10px;
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-sidebar {
        position: relative;
        top: 0;
    }

    .nav-about {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 10px;
    }

    .nav-about li {
        white-space: nowrap;
    }
	
	@media (max-width: 480px) {
        .account-link {
            padding: 8px 12px;
            font-size: 0.8rem;
        }
    }
}

@media (max-width: 600px) {
    .about-main {
        padding: 25px;
        border-radius: 20px;
    }

    .about-main h1 {
        font-size: 1.8rem;
    }
}

/* ============================================================
   MESSAGE DE BIENVENUE - FEED ACCUEIL
   ============================================================ */

.welcome_message {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7f0 100%);
    border: 1px solid var(--primary-glow);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--soft-shadow);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

/* Petit décor discret en arrière-plan */
.welcome_message::after {
    content: "\f0a1"; /* Icône de fusée ou annonce */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    bottom: -20px;
    right: 10px;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.05;
    transform: rotate(-15deg);
}

#bienvenue {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.welcome_message p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 15px;
}

.welcome_message strong {
    color: var(--primary-color);
}

/* Stylisation des liens dans le message */
.welcome_message a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-glow);
    transition: all 0.3s ease;
}

.welcome_message a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    background: var(--primary-glow);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Lien spécifique Esbaace + */
.welcome_message a.highlight {
    color: #d4af37; /* Couleur dorée */
    border-bottom-color: rgba(212, 175, 55, 0.3);
}

.welcome_message a.highlight:hover {
    background: rgba(212, 175, 55, 0.1);
    border-bottom-color: #d4af37;
}

/* Animation d'entrée */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .welcome_message {
        padding: 20px;
        border-radius: 15px;
    }
    
    #bienvenue {
        font-size: 1.4rem;
    }
}