/* ================================================================

   Sourdosphère — main.css

   Palette : vert forêt #1a3a2e · teal #1D9E75 · gris chaud #F1EFE8

   ================================================================ */



/* ── Reset & Base ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }



:root {

    --green-dark:   #1a3a2e;

    --green-mid:    #1D9E75;

    --green-light:  #E1F5EE;

    --green-border: #9FE1CB;

    --purple-light: #EEEDFE;

    --purple-mid:   #534AB7;

    --purple-text:  #3C3489;

    --amber-light:  #FAEEDA;

    --amber-text:   #633806;

    --blue-light:   #E6F1FB;

    --blue-text:    #0C447C;

    --gray-bg:      #F7F6F2;

    --gray-light:   #F1EFE8;

    --gray-border:  #D3D1C7;

    --gray-mid:     #888780;

    --gray-text:    #444441;

    --white:        #ffffff;

    --black:        #1a1a18;

    --danger:       #E24B4A;

    --danger-light: #FCEBEB;



    --font: 'Quicksand', -apple-system, sans-serif;

    --radius-sm:  6px;

    --radius-md:  10px;

    --radius-lg:  4px;

    --radius-xl:  24px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.07);

    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);

    --topbar-h:     58px;

    --mobile-nav-h: 62px;

    --max-w:        680px;

    --sidebar-left-w: 260px;

    --sidebar-right-w: 300px;

}



html { font-size: 16px; -webkit-text-size-adjust: 100%; }



body {

    font-family: var(--font);

    background: var(--gray-bg);

    color: var(--black);

    line-height: 1.6;

    padding-top: var(--topbar-h);

    padding-bottom: var(--mobile-nav-h);

}

/* Bandeau d'avertissement environnement de test (staging) */
.staging-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #e5a000; color: #1a1a18;
    font-size: 0.72rem; font-weight: 700; text-align: center;
    padding: 4px 8px; letter-spacing: 0.3px;
}



/* Le footer suit directement le contenu, sans jamais ajouter de vide

   avant lui : pas de min-height forçant la page à faire un écran complet

   quand le contenu est plus court (voir aussi .sidebar-left/.sidebar-right-wrap

   et .desktop-layout plus bas, qui participaient au même problème via

   height:100vh / flex:1 en cascade). */

.page-wrapper {

    display: flex;

    flex-direction: column;

}

.page-wrapper > main   { flex: 1; }

.page-wrapper > footer { flex-shrink: 0; }



/* ══════════════════════════════════════════════════════════════

   LAYOUT DESKTOP 3 COLONNES

══════════════════════════════════════════════════════════════ */



/* Cache la topbar mobile sur desktop */

@media (min-width: 1024px) {

    .mobile-topbar    { display: none !important; }

    .mobile-only      { display: none !important; }

    body              { padding-top: 0; padding-bottom: 0; }

}



/* Layout 3 colonnes.

   Ni min-height:100vh ni flex:1 ici : ce div doit se dimensionner

   uniquement sur son contenu (le plus grand des 3 colonnes), sinon le

   footer se retrouve poussé artificiellement en bas d'un écran complet

   même quand le contenu est plus court, avec un vide avant lui. Voir

   aussi .sidebar-left / .sidebar-right-wrap juste en dessous : c'était

   en fait leur height:100vh qui forçait cette ligne à faire au moins un

   écran de haut (un enfant flex avec une hauteur explicite impose cette

   hauteur à tout le conteneur) — converti en max-height pour garder le

   comportement sticky + défilement interne sans forcer de hauteur

   minimum quand le contenu (nav, widgets) est plus court que l'écran. */

.desktop-layout {

    display: flex;

    width: 100%;

    gap: 0;

}



/* ── Sidebar gauche ───────────────────────────────────────── */

.sidebar-left {
    width: var(--sidebar-left-w);
    min-width: var(--sidebar-left-w);
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.4rem 0.75rem;
    border-right: none;
    background: #132720;
    gap: 0;
    flex-shrink: 0;
    scrollbar-width: none;
}
.sidebar-left::-webkit-scrollbar { display: none; }

.sidebar-left__logo {
    font-size: 1.15rem; font-weight: 700; color: #fff;
    text-decoration: none; padding: 0.35rem 0.7rem 0.6rem; display: block;
    letter-spacing: -0.3px; flex-shrink: 0;
}
.sidebar-left__logo:hover { text-decoration: none; }

.sidebar-left__nav {
    display: flex; flex-direction: column; gap: 1px; flex: 1;
    overflow-y: auto; scrollbar-width: none;
}
.sidebar-left__nav::-webkit-scrollbar { display: none; }

/* Labels de section */
.sidebar-left__section-label {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #6f8c81;
    padding: 0.75rem 0.7rem 0.15rem; opacity: 1; flex-shrink: 0;
}

.sidebar-left__link {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.38rem 0.7rem 0.38rem calc(0.7rem - 2px);
    border-left: 2px solid transparent; border-radius: 0 6px 6px 0;
    font-size: 0.8rem; color: #cfe3da; text-decoration: none;
    transition: background 0.1s, color 0.1s, border-color 0.1s; position: relative;
    font-weight: 500; line-height: 1.3; flex-shrink: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-left__link:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.sidebar-left__link--active { color: #fff; font-weight: 700; background: rgba(93,202,165,0.12); border-left-color: var(--green-mid); }
.sidebar-left__link--active svg { stroke: var(--green-mid); opacity: 1; }
.sidebar-left__link svg { flex-shrink: 0; opacity: 0.7; width: 15px; height: 15px; }
.sidebar-left__link:hover svg { opacity: 1; }
.sidebar-left__badge {
    margin-left: auto; min-width: 15px; height: 15px;
    background: var(--green-mid); color: #fff;
    font-size: 9px; font-weight: 700; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
    flex-shrink: 0;
}

.sidebar-left__publish {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 0.5rem 0.3rem 0.3rem;
    padding: 0.6rem; border-radius: var(--radius-xl);
    background: var(--green-mid); color: #fff;
    font-size: 0.82rem; font-weight: 700; text-decoration: none;
    transition: background 0.15s; flex-shrink: 0;
}
.sidebar-left__publish:hover { background: #18845f; text-decoration: none; color: #fff; }
.sidebar-left__publish svg { width: 14px; height: 14px; }

.sidebar-left__profile-row {
    display: flex; align-items: center; gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.25rem; padding-top: 0.55rem;
    flex-shrink: 0;
}
.sidebar-left__profile {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.55rem 0.5rem; border-radius: 6px;
    text-decoration: none;
    transition: background 0.12s; flex: 1; min-width: 0;
}
.sidebar-left__profile:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar-left__profile-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; width: 30px; height: 30px; }
.sidebar-left__profile-info { min-width: 0; }
.sidebar-left__profile-name { font-size: 0.77rem; font-weight: 700; color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-left__profile-link { font-size: 0.68rem; color: #8fac9f; display: block; }
.sidebar-left__logout {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #8fac9f; transition: background 0.12s, color 0.12s;
}
.sidebar-left__logout:hover { background: rgba(240,149,149,0.12); color: #F09595; }



/* ── Colonne centrale ─────────────────────────────────────── */

.desktop-main {

    flex: 1;

    min-width: 0;

    border-right: 1px solid var(--gray-border);

    border-left: 1px solid var(--gray-border);

    background: var(--gray-bg);

}

.desktop-main.main-content {

    padding: 1.5rem 2rem;

    max-width: 860px;

    margin: 0 auto;

    width: 100%;

    box-sizing: border-box;

}



/* ── Variante messages — sans sidebar droite, colonne centrale pleine ── */

.desktop-layout--messages .desktop-main--messages {

    flex: 1;

    min-width: 0;

    border-right: none;

}

/* Même remarque qu'en haut de messages.css : height:100vh ici doit rester

   réservé au desktop, sinon ça déborde de l'écran mobile et pousse la

   barre de saisie hors du viewport visible. */

@media (min-width: 1024px) {

    .desktop-layout--messages .desktop-main--messages {

        height: 100vh;

        overflow: hidden;

    }

}

.desktop-layout--messages .sidebar-right-wrap {

    display: none !important;

}



/* ── Sidebar droite ───────────────────────────────────────── */

.sidebar-right-wrap {

    width: var(--sidebar-right-w);

    min-width: var(--sidebar-right-w);

    position: sticky;

    top: 0;

    max-height: 100vh;

    overflow-y: auto;

    padding: 1rem 0.85rem;

    flex-shrink: 0;

    background: var(--white);

    border-left: 1px solid var(--gray-border);

}



.sidebar-right {

    display: flex; flex-direction: column; gap: 1rem;

}



/* Widgets sidebar droite */

.sidebar-widget {

    background: var(--white); border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg); padding: 1rem;

    display: flex; flex-direction: column; gap: 0.5rem;

}

.sidebar-widget__title {
    font-size: 0.875rem; font-weight: 700; color: var(--black);
    margin-bottom: 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-light);
}

/* Stats communaute */
.sidebar-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}
.sidebar-stat {
    background: var(--green-light); border-radius: var(--radius-md);
    padding: 0.6rem 0.25rem; text-align: center;
}
.sidebar-stat__num { font-weight: 700; font-size: 1.05rem; color: #085041; }
.sidebar-stat__label { font-size: 0.65rem; color: #0F6E56; }

/* Groupes suggeres */
.sidebar-group-row {
    display: flex; align-items: center; gap: 0.6rem; text-decoration: none;
    padding: 0.4rem 0;
}
.sidebar-group-row:hover { text-decoration: none; }
.sidebar-group-row__icon {
    width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0;
    background: var(--green-dark); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
}
.sidebar-group-row__body { flex: 1; min-width: 0; }
.sidebar-group-row__name { font-size: 0.8rem; font-weight: 600; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-group-row__meta { font-size: 0.68rem; color: var(--gray-mid); }
.sidebar-join-btn {
    flex-shrink: 0; font-weight: 700; font-size: 0.68rem;
    background: var(--green-light); color: #0F6E56; border: none;
    border-radius: 14px; padding: 0.3rem 0.6rem; cursor: pointer;
}
.sidebar-join-btn:hover { background: #d2f0e3; }

/* Teaser Cafe Signe */
.sidebar-cafe-teaser {
    background: #132720; border-radius: var(--radius-lg); padding: 0.9rem 1rem;
    display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none;
}
.sidebar-cafe-teaser:hover { text-decoration: none; }
.sidebar-cafe-teaser__label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px; color: var(--green-mid);
}
.sidebar-cafe-teaser__title { font-size: 0.85rem; font-weight: 600; color: #fff; }
.sidebar-cafe-teaser__cta {
    display: inline-flex; align-self: flex-start;
    font-size: 0.72rem; font-weight: 700; color: #fff;
    background: var(--green-mid); border-radius: 14px; padding: 0.35rem 0.75rem;
}

/* Recherche sidebar */
.sidebar-search {

    display: flex; align-items: center; gap: 8px;

    background: var(--gray-bg); border: 1px solid var(--gray-border);

    border-radius: 20px; padding: 0.5rem 0.85rem;

    transition: border-color 0.15s;

}

.sidebar-search:focus-within { border-color: var(--green-mid); }

.sidebar-search svg { color: var(--gray-mid); flex-shrink: 0; }

.sidebar-search__input {

    flex: 1; border: none; background: transparent; outline: none;

    font-size: 0.875rem; font-family: var(--font); color: var(--black);

}

.sidebar-search__input::placeholder { color: var(--gray-mid); }



/* Items topics/liens */

.sidebar-topic-item {

    display: flex; flex-direction: column; gap: 2px;

    padding: 0.4rem 0.5rem; border-radius: var(--radius-sm);

    text-decoration: none; transition: background 0.1s;

}

.sidebar-topic-item:hover { background: var(--gray-bg); text-decoration: none; }

.sidebar-topic-item__title { font-size: 0.82rem; color: var(--black); font-weight: 500; line-height: 1.4; }

.sidebar-topic-item__meta  { font-size: 0.72rem; color: var(--gray-mid); }



/* Items catégories */

.sidebar-cat-item {

    display: flex; align-items: center; justify-content: space-between;

    padding: 0.35rem 0.5rem; border-radius: var(--radius-sm);

    font-size: 0.82rem; color: var(--gray-text); text-decoration: none;

    transition: background 0.1s;

}

.sidebar-cat-item:hover { background: var(--gray-bg); text-decoration: none; color: var(--black); }

.sidebar-cat-item__count {

    font-size: 0.72rem; color: var(--gray-mid);

    background: var(--gray-light); padding: 1px 6px; border-radius: 10px;

}



/* Items événements */

.sidebar-event-item {

    display: flex; align-items: center; gap: 0.65rem;

    padding: 0.4rem 0.35rem; border-radius: var(--radius-sm);

    text-decoration: none; transition: background 0.1s;

}

.sidebar-event-item:hover { background: var(--gray-bg); text-decoration: none; }

.sidebar-event-item__date {

    width: 36px; min-width: 36px; text-align: center;

    background: var(--green-dark); border-radius: var(--radius-sm);

    padding: 3px 4px; display: flex; flex-direction: column; align-items: center;

}

.sidebar-event-item__date span { font-size: 8px; font-weight: 700; color: rgba(255,255,255,0.7); text-transform: uppercase; }

.sidebar-event-item__date strong { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }

.sidebar-event-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }



/* Membres */

.sidebar-members { display: flex; flex-wrap: wrap; gap: 6px; padding: 0.25rem 0; }

.sidebar-member  { position: relative; text-decoration: none; }

.sidebar-member__avatar { border-radius: 50%; object-fit: cover; border: 2px solid var(--white); transition: transform 0.15s; }

.sidebar-member:hover .sidebar-member__avatar { transform: scale(1.1); }

.sidebar-member__badge { position: absolute; bottom: -2px; right: -2px; font-size: 10px; line-height: 1; }



/* Plus de liens */

.sidebar-more-link {

    font-size: 0.78rem; color: var(--green-mid); text-decoration: none;

    padding: 0.25rem 0.5rem; font-weight: 500;

}

.sidebar-more-link:hover { text-decoration: underline; }



/* Liens légaux */

.sidebar-legal {

    display: flex; flex-direction: column; gap: 4px;

    padding: 0.5rem;

}

.sidebar-legal a, .sidebar-legal span {

    font-size: 0.72rem; color: var(--gray-mid); text-decoration: none;

}

.sidebar-legal a:hover { text-decoration: underline; }



a { color: var(--green-mid); text-decoration: none; }

a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

button { font-family: var(--font); cursor: pointer; }



/* ── Topbar ───────────────────────────────────────────────────── */

.topbar {

    position: fixed;

    top: 0; left: 0; right: 0;

    z-index: 100;

    height: var(--topbar-h);

    background: var(--green-dark);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 1rem;

    gap: 1rem;

}



.topbar__logo {

    font-size: 1.2rem;

    font-weight: 600;

    color: #fff;

    letter-spacing: 0.3px;

    text-decoration: none;

    flex-shrink: 0;

}

.topbar__logo:hover { text-decoration: none; }

.topbar__logo-dot, .logo-dot { color: var(--green-mid); }



.topbar__nav { display: flex; align-items: center; gap: 0.25rem; }

.topbar__link {

    color: rgba(255,255,255,0.7);

    font-size: 0.9rem;

    padding: 0.4rem 0.75rem;

    border-radius: var(--radius-sm);

    transition: color 0.15s, background 0.15s;

}

.topbar__link:hover, .topbar__link.active {

    color: #fff;

    background: rgba(255,255,255,0.1);

    text-decoration: none;

}



.topbar__actions { display: flex; align-items: center; gap: 0.5rem; }



.topbar__notif {

    position: relative;

    color: rgba(255,255,255,0.8);

    display: flex;

    align-items: center;

    padding: 0.35rem;

    border-radius: 50%;

    transition: background 0.15s;

}

.topbar__notif:hover { background: rgba(255,255,255,0.1); }



.notif-badge {

    position: absolute;

    top: 0; right: 0;

    min-width: 16px; height: 16px;

    background: var(--danger);

    color: #fff;

    font-size: 10px;

    font-weight: 600;

    border-radius: 8px;

    display: flex; align-items: center; justify-content: center;

    padding: 0 3px;

    border: 2px solid var(--green-dark);

}



.topbar__avatar img {

    width: 34px; height: 34px;

    border-radius: 50%;

    object-fit: cover;

    border: 2px solid rgba(255,255,255,0.2);

    transition: border-color 0.15s;

}

.topbar__avatar:hover img { border-color: var(--green-mid); }



/* ── Mobile nav ───────────────────────────────────────────────── */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--mobile-nav-h);
    background: #132720;
    border-top: none;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav__item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; color: #7fa595; font-size: 10px;
    padding: 6px 4px; text-decoration: none; transition: color 0.15s;
    position: relative;
    background: none; border: none; cursor: pointer; font-family: inherit;
}

.mobile-nav__item:hover,
.mobile-nav__item.active { color: #5DCAA5; text-decoration: none; }

.mobile-nav__item--publish {

    background: var(--green-dark); color: #fff;

    width: 50px; height: 50px; flex: none;

    border-radius: 50%; padding: 0; justify-content: center;

    margin-bottom: 6px; flex-shrink: 0;

    box-shadow: 0 2px 12px rgba(26,58,46,0.35);

}

.mobile-nav__item--publish:hover { background: #0e2820; color: #fff; }

.mobile-nav__avatar {

    width: 24px; height: 24px; border-radius: 50%; object-fit: cover;

}

.mobile-nav__badge {

    position: absolute; top: 2px; right: 50%; transform: translateX(14px);

    min-width: 16px; height: 16px; background: #D85A30; color: #fff;

    font-size: 9px; font-weight: 700; border-radius: 8px;

    display: flex; align-items: center; justify-content: center; padding: 0 3px;

    border: 2px solid #132720;

}



/* ── Hamburger ────────────────────────────────────── */

.topbar__hamburger {

    display: none;

    flex-direction: column; gap: 5px; align-items: center; justify-content: center;

    width: 36px; height: 36px; background: rgba(255,255,255,0.1);

    border: none; border-radius: var(--radius-sm); cursor: pointer; padding: 7px 6px;

}

.topbar__hamburger span {

    display: block; width: 20px; height: 2px;

    background: #fff; border-radius: 2px;

}



/* ── Drawer ───────────────────────────────────────── */

.drawer-overlay {

    display: none; position: fixed; inset: 0;

    z-index: 200; background: rgba(0,0,0,0.45);

}

.drawer-overlay--visible { display: block; animation: fadeIn 0.2s ease; }



.drawer {
    position: fixed; top: 0; right: -300px; bottom: 0;
    width: 280px; z-index: 201;
    background: #132720; display: flex; flex-direction: column;
    transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    overflow-y: auto;
}
.drawer--open { right: 0; }

.drawer__profile {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1.25rem 1rem 1rem; background: transparent; flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer__profile-avatar { border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0; }
.drawer__profile-name  { font-size: 0.95rem; font-weight: 700; color: #fff; }
.drawer__profile-link  { font-size: 0.78rem; color: #8fac9f; text-decoration: none; }
.drawer__profile-link:hover { color: #fff; }
.drawer__close {
    margin-left: auto; background: rgba(255,255,255,0.1); border: none;
    color: rgba(255,255,255,0.8); border-radius: 50%; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.drawer__close:hover { background: rgba(255,255,255,0.2); }

.drawer__nav { flex: 1; padding: 0.75rem 0; }
.drawer__section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #6f8c81; padding: 0.5rem 1.1rem 0.25rem;
}
.drawer__link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1.1rem; font-size: 0.9rem; color: #cfe3da;
    text-decoration: none; transition: background 0.12s, color 0.12s;
    border-left: 2px solid transparent;
}
.drawer__link svg { flex-shrink: 0; opacity: 0.75; }
.drawer__link:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.drawer__link--active { background: rgba(93,202,165,0.12); color: #fff; font-weight: 700; border-left-color: var(--green-mid); }
.drawer__link--active svg { opacity: 1; stroke: var(--green-mid); }

.drawer__footer {
    padding: 1rem 1.1rem; border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.drawer__logout {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.875rem; color: #8fac9f; text-decoration: none; transition: color 0.15s;
}
.drawer__logout:hover { color: #F09595; }



/* ── Main content ─────────────────────────────────────────────── */

.main-content {

    max-width: var(--max-w);

    margin: 0 auto;

    padding: 1.25rem 1rem;

}



/* ── Boutons ──────────────────────────────────────────────────── */

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    font-size: 0.9rem;

    font-weight: 500;

    padding: 0.55rem 1.1rem;

    border-radius: var(--radius-md);

    border: 1.5px solid transparent;

    cursor: pointer;

    transition: all 0.15s;

    text-decoration: none;

    white-space: nowrap;

    line-height: 1;

}



.btn--primary {

    background: var(--green-dark);

    color: #fff;

    border-color: var(--green-dark);

}

.btn--primary:hover { background: #0e2820; text-decoration: none; color: #fff; }



.btn--outline {

    background: transparent;

    color: var(--green-mid);

    border-color: var(--green-mid);

}

.btn--outline:hover { background: var(--green-light); text-decoration: none; }



.btn--ghost {

    background: rgba(255,255,255,0.1);

    color: #fff;

    border-color: rgba(255,255,255,0.25);

}

.btn--ghost:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: #fff; }



.btn--danger {

    background: var(--danger-light);

    color: var(--danger);

    border-color: var(--danger);

}

.btn--danger:hover { background: var(--danger); color: #fff; text-decoration: none; }



.btn--sm  { font-size: 0.82rem; padding: 0.4rem 0.85rem; }

.btn--lg  { font-size: 1rem;    padding: 0.75rem 1.5rem;  }

.btn--full { width: 100%; }



/* ── Formulaires ──────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: 1rem; }



.form__row {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1rem;

}



.form__group { display: flex; flex-direction: column; gap: 0.35rem; }



.form__label {

    font-size: 0.875rem;

    font-weight: 500;

    color: var(--gray-text);

}



.required { color: var(--danger); }



.form__input,

.form__select,

.form__textarea {

    width: 100%;

    padding: 0.65rem 0.9rem;

    font-size: 1rem;

    font-family: var(--font);

    border: 1.5px solid var(--gray-border);

    border-radius: var(--radius-md);

    background: var(--white);

    color: var(--black);

    transition: border-color 0.15s, box-shadow 0.15s;

    outline: none;

}

.form__input:focus,

.form__select:focus,

.form__textarea:focus {

    border-color: var(--green-mid);

    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15);

}

.form__textarea { resize: vertical; min-height: 100px; line-height: 1.6; }



.form__input-wrap { position: relative; }

.form__input-wrap .form__input { padding-right: 2.5rem; }

.form__eye {

    position: absolute;

    right: 0.65rem; top: 50%;

    transform: translateY(-50%);

    background: none; border: none;

    color: var(--gray-mid);

    padding: 4px;

    display: flex; align-items: center;

}

.form__eye:hover { color: var(--black); }



.form__hint {

    font-size: 0.78rem;

    color: var(--gray-mid);

}



.form__checkbox {

    display: flex;

    align-items: center;

    gap: 0.6rem;

    cursor: pointer;

}

.form__checkbox input[type="checkbox"] {

    width: 18px; height: 18px;

    accent-color: var(--green-mid);

    cursor: pointer;

    flex-shrink: 0;

}

.form__checkbox-label { font-size: 0.9rem; }



.form__section-title {

    font-size: 0.85rem;

    font-weight: 600;

    color: var(--gray-text);

    text-transform: uppercase;

    letter-spacing: 0.5px;

    padding-top: 0.5rem;

    border-top: 1px solid var(--gray-light);

}



/* ── Auth pages ───────────────────────────────────────────────── */

.auth-wrapper {

    display: flex;

    justify-content: center;

    padding: 2rem 1rem;

}



.auth-card {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-xl);

    padding: 2rem;

    width: 100%;

    max-width: 420px;

    box-shadow: var(--shadow-md);

}

.auth-card--wide { max-width: 600px; }



.auth-card__logo {

    text-align: center;

    margin-bottom: 1.75rem;

}

.logo-text {

    font-size: 1.6rem;

    font-weight: 700;

    color: var(--green-dark);

}

.auth-card__tagline {

    font-size: 0.875rem;

    color: var(--gray-mid);

    margin-top: 0.25rem;

}



.auth-card__switch {

    text-align: center;

    font-size: 0.875rem;

    color: var(--gray-mid);

    margin-top: 1.25rem;

}



/* ── Alertes ──────────────────────────────────────────────────── */

.alert {

    padding: 0.75rem 1rem;

    border-radius: var(--radius-md);

    font-size: 0.875rem;

    line-height: 1.5;

    margin-bottom: 0.5rem;

}

.alert--error {

    background: var(--danger-light);

    color: #7a1f1f;

    border: 1px solid #f0a0a0;

}

.alert--success {

    background: var(--green-light);

    color: #0a4a30;

    border: 1px solid var(--green-border);

}



.flash {

    position: fixed;

    top: calc(var(--topbar-h) + 0.75rem);

    left: 50%;

    transform: translateX(-50%);

    z-index: 200;

    padding: 0.75rem 1.25rem;

    border-radius: var(--radius-md);

    font-size: 0.9rem;

    display: flex;

    align-items: center;

    gap: 0.75rem;

    box-shadow: var(--shadow-md);

    max-width: 90vw;

}

.flash--success {

    background: var(--green-dark);

    color: #fff;

}

.flash__close {

    background: none; border: none;

    color: inherit; opacity: 0.7;

    font-size: 1rem; cursor: pointer;

    padding: 0;

}

.flash__close:hover { opacity: 1; }



/* ── Badges accessibilité ─────────────────────────────────────── */

.badge {

    display: inline-flex;

    align-items: center;

    gap: 3px;

    font-size: 11px;

    font-weight: 600;

    padding: 3px 8px;

    border-radius: 20px;

    flex-shrink: 0;

}

.badge--lsf      { background: var(--green-light);  color: #0F6E56; }

.badge--subtitles { background: var(--purple-light); color: var(--purple-text); }

.badge--event    { background: var(--amber-light);   color: var(--amber-text); }

.badge--job      { background: var(--blue-light);    color: var(--blue-text); }

.badge--trade    { background: var(--gray-light);    color: var(--gray-text); }



/* ── Error page ───────────────────────────────────────────────── */

.error-page {

    text-align: center;

    padding: 4rem 1rem;

}

.error-page__code  { font-size: 5rem; font-weight: 700; color: var(--gray-border); line-height: 1; }

.error-page__title { font-size: 1.5rem; margin: 0.5rem 0; }

.error-page__text  { color: var(--gray-mid); margin-bottom: 1.5rem; }



/* ── Utilitaires ──────────────────────────────────────────────── */

.desktop-only { display: flex; }

.mobile-only  { display: none; }

.text-muted   { color: var(--gray-mid); }

.text-sm      { font-size: 0.875rem; }

.mt-1 { margin-top: 0.5rem; }

.mt-2 { margin-top: 1rem; }



/* ================================================================

   FIL D'ACTUALITÉ

   ================================================================ */



/* ── Feed header ──────────────────────────────────────────────── */





/* Badge groupe sur une carte post */

.post-card__group-badge {

    display: inline-flex; align-items: center; gap: 5px;

    font-size: 0.72rem; font-weight: 600; color: var(--green-mid, #1D9E75);

    background: var(--green-light, #f0fdf6); padding: 3px 9px;

    border-radius: 20px; margin-bottom: 0.6rem; text-decoration: none;

    width: fit-content;

}

.post-card__group-badge:hover { text-decoration: underline; }



/* Baniere annonce (admin) */

.announce-banner {

    display: flex; align-items: flex-start; gap: 0.75rem;

    background: var(--green-dark); color: #fff;

    padding: 0.85rem 1rem; margin-bottom: 1rem;

    border-radius: 4px;

    transition: opacity 0.15s, transform 0.15s;

}

.announce-banner__icon {

    flex-shrink: 0; color: var(--green-mid); margin-top: 1px;

}

.announce-banner__body { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; row-gap: 2px; }

.announce-banner__text { font-size: 0.9rem; line-height: 1.5; }

.announce-banner__link {

    font-size: 0.85rem; font-weight: 600; color: var(--green-mid);

    white-space: nowrap; text-decoration: underline;

}

.announce-banner__link:hover { color: #fff; }

.announce-banner__close {

    flex-shrink: 0; background: none; border: none; cursor: pointer;

    color: rgba(255,255,255,0.6); padding: 2px; line-height: 0;

    transition: color 0.12s;

}

.announce-banner__close:hover { color: #fff; }








.feed-welcome {

    background: var(--green-dark);

    border-radius: var(--radius-lg);

    padding: 2rem 1.5rem;

    text-align: center;

    color: #fff;

}

.feed-welcome__title { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }

.feed-welcome__text  { opacity: 0.8; margin-bottom: 1.25rem; }

.feed-welcome__actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }



/* ── Post card ────────────────────────────────────────────────── */

.post-list { display: flex; flex-direction: column; gap: 0.75rem; }



.post-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
}



.post-card__header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0.85rem 1rem 0.6rem;

    gap: 0.5rem;

}



.post-card__author {

    display: flex;

    align-items: center;

    gap: 0.65rem;

    text-decoration: none;

    min-width: 0;

}

.post-card__author:hover .post-card__name { text-decoration: underline; }



.post-card__avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-card__name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--black);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.post-card__name:hover { text-decoration: underline; }

.post-card__avatar-link { flex-shrink: 0; display: block; }
.post-card__author-group { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }

.post-card__time {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-mid);
    text-decoration: none;
}
.post-card__time:hover { text-decoration: underline; }

.post-card__badges { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Menu Signaler/Supprimer (posts et commentaires) ─────────────── */
.post-card__menu, .comment-item__menu { position: relative; flex-shrink: 0; }
.post-card__menu-btn, .comment-item__menu-btn {
    background: none; border: none; color: var(--gray-mid); cursor: pointer;
    padding: 4px; border-radius: 4px; display: flex; align-items: center;
}
.post-card__menu-btn:hover, .comment-item__menu-btn:hover { background: var(--gray-bg); color: var(--black); }
.post-card__menu-dropdown, .comment-item__menu-dropdown {
    position: absolute; top: 100%; right: 0; z-index: 15;
    background: #fff; border: 1px solid var(--gray-border); border-radius: 6px;
    box-shadow: var(--shadow-sm); min-width: 150px; padding: 4px; margin-top: 4px;
}
.post-card__menu-dropdown.hidden, .comment-item__menu-dropdown.hidden { display: none; }
.post-card__menu-dropdown button, .comment-item__menu-dropdown button {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 8px 10px; font-size: 0.85rem; color: var(--black); cursor: pointer;
    border-radius: 4px; font-family: var(--font);
}
.post-card__menu-dropdown button:hover, .comment-item__menu-dropdown button:hover { background: var(--gray-bg); }


.post-card__content {
    padding: 0 1rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--black);
    white-space: normal;
    word-break: break-word;
}

.post-card__content--lg { font-size: 1rem; }

.post-card__media { background: #0a0e0c; }
.post-card__media img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}
.post-card__media video {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
    background: #0a0e0c;
}

/* ── Résumé likes/commentaires ───────────────────────────────── */
.post-card__stats {
    display: flex; align-items: center; gap: 6px;
    padding: 0.5rem 1rem 0; font-size: 0.78rem; color: var(--gray-mid);
    min-height: 22px;
}
.post-card__stats-heart {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    background: #D85A30; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.post-card__stats-sep { color: var(--gray-mid); }
.post-card__stats-heart svg { width: 9px; height: 9px; }
.post-card__stats-comment-link { color: var(--gray-mid); background: none; border: none; font-family: var(--font); font-size: 0.78rem; cursor: pointer; padding: 0; text-decoration: none; }
.post-card__stats-comment-link:hover { text-decoration: underline; }

/* ── Rangée d'actions pleine largeur ─────────────────────────── */
.post-card__actions {
    display: flex;
    border-top: 1px solid var(--gray-light);
    margin-top: 0.5rem;
}

.action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-mid);
    background: none;
    border: none;
    border-right: 1px solid var(--gray-light);
    padding: 0.65rem 0.5rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, transform 0.1s;
    text-decoration: none;
    font-family: var(--font);
}
.action-btn:last-child { border-right: none; }

.action-btn:hover { color: var(--black); background: var(--gray-light); text-decoration: none; }
.action-btn--liked { color: #D85A30; }
.action-btn--liked:hover { color: #D85A30; }
.action-btn--liked svg { animation: like-pop 0.3s ease; }
@keyframes like-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}
.action-btn--danger:hover { color: var(--danger); }
.action-btn--static { cursor: default; flex: initial; }
.action-btn--static:hover { background: none; color: var(--gray-mid); }
.action-btn--link {
    flex: initial; font-weight: 600; border-right: none;
    color: var(--green-mid); margin-left: auto;
}

.like-form { display: inline-flex; flex: 1; }
.like-form .action-btn { width: 100%; }

/* ── Commentaires intégrés au feed ───────────────────────────────── */
.post-comments {
    display: none;
    border-top: 1px solid var(--gray-light);
    background: var(--gray-bg);
    padding: 0.85rem 1rem;
}
.post-comments--open { display: block; }

.post-comments__list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
.post-comments__loading { font-size: 0.82rem; color: var(--gray-mid); text-align: center; padding: 0.5rem; }
.post-comments__empty { font-size: 0.82rem; color: var(--gray-mid); text-align: center; padding: 0.5rem; }

.comment-item { display: flex; gap: 0.55rem; }
.comment-item__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-item__body { flex: 1; min-width: 0; }
.comment-item__bubble {
    background: #fff; border: 1px solid var(--gray-border); border-radius: 8px;
    padding: 0.55rem 0.8rem; display: inline-block; max-width: 100%;
}
.comment-item__name { font-size: 0.82rem; font-weight: 700; color: var(--black); }
.comment-item__text { font-size: 0.85rem; color: var(--black); line-height: 1.5; word-break: break-word; margin-top: 1px; }
.comment-item__media { margin-top: 0.4rem; max-width: 220px; border-radius: 6px; display: block; cursor: pointer; }
.comment-item__meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.25rem; padding-left: 0.8rem; }
.comment-item__time { font-size: 0.7rem; color: var(--gray-mid); }
.comment-item__reply-link { font-size: 0.72rem; font-weight: 700; color: var(--gray-mid); background: none; border: none; cursor: pointer; padding: 0; }
.comment-item__reply-link:hover { color: var(--green-mid); }
.comment-item__replies { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.6rem; padding-left: 1.1rem; border-left: 2px solid var(--green-light); }

.comment-form-inline { display: flex; gap: 0.55rem; align-items: flex-start; margin-top: 0.5rem; }
.comment-form-inline__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-form-inline__body { flex: 1; }
.comment-form-inline__row { display: flex; align-items: center; gap: 0.5rem; }
.comment-form-inline__input {
    flex: 1; border: 1px solid var(--gray-border); border-radius: 8px;
    padding: 0.5rem 0.9rem; font-size: 0.85rem; font-family: var(--font);
    background: #fff; outline: none; resize: none;
    height: 38px; max-height: 38px; overflow-y: auto;
}
.comment-form-inline__input:focus { border-color: var(--green-mid); background: #fff; }
.comment-form-inline__photo-btn {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: #fff; border: 1px solid var(--gray-border); color: var(--gray-mid);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.comment-form-inline__photo-btn:hover { background: var(--gray-light); color: var(--black); }
.comment-form-inline__submit {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: var(--green-mid); border: none; color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    opacity: 0.4; pointer-events: none; transition: opacity 0.15s;
}
.comment-form-inline__submit--active { opacity: 1; pointer-events: all; }
.comment-form-inline__submit:hover { background: #18845f; }
.comment-form-inline__preview {
    position: relative; margin-top: 0.5rem; width: 90px; display: none;
}
.comment-form-inline__preview img { width: 90px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.comment-form-inline__preview-remove {
    position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
    border-radius: 50%; background: var(--black); color: #fff; border: none;
    font-size: 0.65rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.post-comments__login-prompt {
    display: block; text-align: center; font-size: 0.82rem; font-weight: 700;
    color: var(--green-mid); padding: 0.5rem; margin-top: 0.5rem;
}
.post-comments__login-prompt:hover { text-decoration: underline; }

/* ── Post détail ──────────────────────────────────────────────── */
.post-detail { display: flex; flex-direction: column; gap: 1rem; }
.post-card--detail .post-card__content { font-size: 1.05rem; }



.back-link {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    font-size: 0.875rem;

    color: var(--gray-mid);

    text-decoration: none;

    padding: 0.35rem 0;

}

.back-link:hover { color: var(--black); }



/* ── Commentaires ─────────────────────────────────────────────── */

.comments { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-lg); padding: 1.25rem 1rem; }

.comments__title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

.comments__login-prompt { font-size: 0.875rem; color: var(--gray-mid); padding: 0.5rem 0; }



.comment-form {

    display: flex;

    gap: 0.65rem;

    align-items: flex-start;

    margin-bottom: 1.25rem;

    padding-bottom: 1.25rem;

    border-bottom: 1px solid var(--gray-light);

}

.comment-form__avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }

.comment-form__right { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }

.comment-form__textarea { min-height: 70px; font-size: 0.9rem; }



.comment-list { display: flex; flex-direction: column; gap: 0.85rem; }



.comment { display: flex; gap: 0.65rem; align-items: flex-start; }

.comment__avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.comment__body { flex: 1; background: var(--gray-light); border-radius: var(--radius-md); padding: 0.6rem 0.85rem; }

.comment__header { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }

.comment__name { font-weight: 500; font-size: 0.875rem; color: var(--black); text-decoration: none; }

.comment__name:hover { text-decoration: underline; }

.comment__time { font-size: 0.75rem; color: var(--gray-mid); }

.comment__text { font-size: 0.9rem; line-height: 1.5; word-break: break-word; }



/* ── Création de post ─────────────────────────────────────────── */

.create-post { display: flex; flex-direction: column; gap: 1rem; }



.create-post__header { display: flex; align-items: center; gap: 1rem; }

.create-post__title  { font-size: 1.2rem; font-weight: 600; }



.create-post__form {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.25rem;

}



.create-post__author {

    display: flex;

    align-items: center;

    gap: 0.65rem;

    margin-bottom: 0.75rem;

}

.create-post__author-name { font-weight: 500; }



.create-post__textarea { font-size: 1rem; min-height: 120px; border: none; padding: 0; resize: none; box-shadow: none !important; }

.create-post__textarea:focus { border: none; box-shadow: none !important; }



.create-post__char-count { text-align: right; font-size: 0.78rem; color: var(--gray-mid); margin-top: -0.5rem; }



.create-post__accessibility {

    background: var(--gray-light);

    border-radius: var(--radius-md);

    padding: 0.85rem 1rem;

}

.create-post__accessibility-title {

    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 0.85rem;

    font-weight: 500;

    color: var(--gray-text);

    margin-bottom: 0.65rem;

}

.create-post__checkboxes { display: flex; flex-direction: column; gap: 0.5rem; }



/* ── Upload média ─────────────────────────────────────────────── */

.media-upload { border: 1.5px dashed var(--gray-border); border-radius: var(--radius-md); overflow: hidden; }

.media-upload__input { display: none; }

.media-upload__label {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 6px;

    padding: 1.5rem;

    cursor: pointer;

    color: var(--gray-mid);

    transition: background 0.15s;

    text-align: center;

}

.media-upload__label:hover { background: var(--gray-light); }

.media-upload__hint { font-size: 0.75rem; }



.media-upload__preview { position: relative; }

.media-upload__preview img,

.media-upload__preview video { width: 100%; max-height: 300px; object-fit: cover; display: block; }

.media-upload__remove {

    position: absolute;

    top: 8px; right: 8px;

    background: rgba(0,0,0,0.55);

    color: #fff;

    border: none;

    border-radius: 50%;

    width: 28px; height: 28px;

    font-size: 13px;

    cursor: pointer;

    display: flex; align-items: center; justify-content: center;

}



/* ── Empty state ──────────────────────────────────────────────── */

.empty-state {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 0.75rem;

    padding: 3rem 1rem;

    color: var(--gray-mid);

    text-align: center;

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

}

.empty-state__icon { opacity: 0.4; }



/* ================================================================

   PROFIL

   ================================================================ */



.profile { display: flex; flex-direction: column; gap: 1.5rem; }



/* ── En-tête profil ───────────────────────────────────────────── */

.profile-header {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

    display: flex;

    gap: 1.5rem;

    align-items: flex-start;

}



.profile-header__avatar-wrap {

    position: relative;

    flex-shrink: 0;

}

.profile-header__avatar {

    width: 90px; height: 90px;

    border-radius: 50%;

    object-fit: cover;

    border: 3px solid var(--gray-light);

    display: block;

}

.profile-header__lsf-badge {

    position: absolute;

    bottom: 0; right: 0;

    font-size: 1.2rem;

    background: var(--white);

    border-radius: 50%;

    width: 28px; height: 28px;

    display: flex; align-items: center; justify-content: center;

    border: 2px solid var(--gray-light);

}



.profile-header__info { flex: 1; min-width: 0; }



.profile-header__top {

    display: flex;

    align-items: center;

    gap: 0.75rem;

    flex-wrap: wrap;

    margin-bottom: 0.5rem;

}

.profile-header__username {

    font-size: 1.3rem;

    font-weight: 700;

    color: var(--green-dark);

}

.profile-header__badges { display: flex; gap: 4px; flex-wrap: wrap; }



.profile-header__bio {

    font-size: 0.92rem;

    color: var(--gray-text);

    line-height: 1.6;

    margin-bottom: 0.85rem;

}



.profile-header__stats {

    display: flex;

    gap: 1.5rem;

    margin-bottom: 1rem;

}

.profile-stat { display: flex; flex-direction: column; align-items: center; gap: 1px; }

.profile-stat__number { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); }

.profile-stat__label  { font-size: 0.75rem; color: var(--gray-mid); }



.profile-header__actions {

    display: flex;

    align-items: center;

    gap: 0.75rem;

    flex-wrap: wrap;

}

.profile-header__since { font-size: 0.78rem; color: var(--gray-mid); }



/* ── Publications sur profil ──────────────────────────────────── */

.profile-posts__title {

    font-size: 1rem;

    font-weight: 600;

    color: var(--gray-text);

    text-transform: uppercase;

    letter-spacing: 0.5px;

    margin-bottom: 0.85rem;

    font-size: 0.82rem;

}



/* ── Édition profil ───────────────────────────────────────────── */

.profile-edit { display: flex; flex-direction: column; gap: 1rem; }

.profile-edit__header { display: flex; align-items: center; gap: 1rem; }

.profile-edit__title  { font-size: 1.2rem; font-weight: 600; }



.profile-edit__form {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

}



.profile-edit__avatar-section {

    display: flex;

    align-items: center;

    gap: 1.25rem;

    padding-bottom: 1.25rem;

    border-bottom: 1px solid var(--gray-light);

    margin-bottom: 0.5rem;

}

.profile-edit__avatar-wrap { position: relative; flex-shrink: 0; }

.profile-edit__avatar-preview {

    width: 80px; height: 80px;

    border-radius: 50%;

    object-fit: cover;

    border: 3px solid var(--gray-light);

    display: block;

}

.profile-edit__avatar-btn {

    position: absolute;

    bottom: 0; right: 0;

    background: var(--green-dark);

    color: #fff;

    border-radius: 50%;

    width: 28px; height: 28px;

    display: flex; align-items: center; justify-content: center;

    cursor: pointer;

    transition: background 0.15s;

}

.profile-edit__avatar-btn:hover { background: #0e2820; }

.profile-edit__avatar-hint { font-size: 0.78rem; color: var(--gray-mid); }



.profile-edit__actions {

    display: flex;

    gap: 0.75rem;

    align-items: center;

    padding-top: 0.5rem;

}

.btn--ghost-cancel {

    background: transparent;

    color: var(--gray-mid);

    border: 1.5px solid var(--gray-border);

}

.btn--ghost-cancel:hover { background: var(--gray-light); color: var(--black); text-decoration: none; }



/* ── Mobile profil ────────────────────────────────────────────── */

@media (max-width: 600px) {

    .profile-header { flex-direction: column; align-items: center; text-align: center; }

    .profile-header__top { justify-content: center; }

    .profile-header__stats { justify-content: center; }

    .profile-header__actions { justify-content: center; }

    .profile-edit__form { padding: 1.25rem 1rem; }

}



/* ================================================================

   PROFIL

   ================================================================ */



.profile { display: flex; flex-direction: column; gap: 1rem; }



/* ── En-tête ──────────────────────────────────────────────────── */

.profile__header {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

    display: flex;

    align-items: flex-start;

    gap: 1.25rem;

    flex-wrap: wrap;

}



.profile__avatar-wrap {

    position: relative;

    flex-shrink: 0;

}

.profile__avatar {

    width: 90px; height: 90px;

    border-radius: 50%;

    object-fit: cover;

    border: 3px solid var(--gray-light);

}

.profile__lsf-dot {

    position: absolute;

    bottom: 2px; right: 2px;

    font-size: 18px;

    line-height: 1;

}



.profile__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }



.profile__name-row {

    display: flex;

    align-items: center;

    gap: 0.5rem;

    flex-wrap: wrap;

}

.profile__username {

    font-size: 1.3rem;

    font-weight: 700;

    color: var(--black);

    margin: 0;

}



.profile__bio {

    font-size: 0.95rem;

    color: var(--gray-text);

    line-height: 1.6;

    word-break: break-word;

}



.profile__since {

    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 0.82rem;

    color: var(--gray-mid);

}



.profile__actions {

    display: flex;

    flex-direction: column;

    gap: 0.5rem;

    align-items: flex-end;

    flex-shrink: 0;

}

@media (max-width: 600px) {

    .profile__header { flex-direction: column; align-items: center; text-align: center; }

    .profile__actions { flex-direction: row; align-items: center; justify-content: center; width: 100%; }

    .profile__actions .btn { flex: 1; justify-content: center; }

    .profile__actions form { flex: 1; }

    .profile__actions form .btn { width: 100%; justify-content: center; }

}



/* Badges rôles */

.badge--admin { background: #1a3a2e; color: #fff; }

.badge--mod   { background: #EEEDFE; color: #3C3489; }

.badge--community { background: var(--gray-light); color: var(--gray-text); }



/* ── Stats ────────────────────────────────────────────────────── */

.profile__stats {

    display: flex;

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    overflow: hidden;

}

.profile__stat {

    flex: 1;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding: 1rem 0.5rem;

    gap: 3px;

    border-right: 1px solid var(--gray-light);

}

.profile__stat:last-child { border-right: none; }

.profile__stat-number {

    font-size: 1.4rem;

    font-weight: 700;

    color: var(--green-dark);

    line-height: 1;

}

.profile__stat-label {

    font-size: 0.75rem;

    color: var(--gray-mid);

    text-align: center;

}



/* ── Posts ────────────────────────────────────────────────────── */

.profile__posts-title {

    font-size: 1rem;

    font-weight: 600;

    color: var(--black);

    margin-bottom: 0.75rem;

}



/* ================================================================

   ÉDITION PROFIL

   ================================================================ */



.profile-edit { display: flex; flex-direction: column; gap: 1rem; }



.profile-edit__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.25rem; }

.profile-edit__title  { font-size: 1.2rem; font-weight: 600; }



.profile-edit__card {

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

    display: flex;

    flex-direction: column;

    gap: 1rem;

}

.profile-edit__section-title {

    font-size: 0.95rem;

    font-weight: 600;

    color: var(--gray-text);

    padding-bottom: 0.75rem;

    border-bottom: 1px solid var(--gray-light);

    margin-bottom: 0.25rem;

}

.profile-edit__optional {

    font-size: 0.8rem;

    font-weight: 400;

    color: var(--gray-mid);

}



/* Avatar upload */

.profile-edit__avatar-section {

    display: flex;

    align-items: center;

    gap: 1rem;

    background: var(--white);

    border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg);

    padding: 1.25rem 1.5rem;

}

.profile-edit__avatar-wrap { position: relative; flex-shrink: 0; }

.profile-edit__avatar-preview {

    width: 80px; height: 80px;

    border-radius: 50%;

    object-fit: cover;

    border: 3px solid var(--gray-light);

    display: block;

}

.profile-edit__avatar-btn {

    position: absolute;

    bottom: 0; right: 0;

    width: 28px; height: 28px;

    background: var(--green-dark);

    color: #fff;

    border-radius: 50%;

    display: flex; align-items: center; justify-content: center;

    cursor: pointer;

    transition: background 0.15s;

}

.profile-edit__avatar-btn:hover { background: #0e2820; }

.profile-edit__avatar-input { display: none; }

.profile-edit__avatar-hint  { font-size: 0.78rem; color: var(--gray-mid); line-height: 1.5; }



/* Compteur bio */

.profile-edit__char-count {

    text-align: right;

    font-size: 0.78rem;

    color: var(--gray-mid);

    margin-top: -0.5rem;

}



/* Footer form */

.profile-edit__footer {

    display: flex;

    justify-content: flex-end;

    gap: 0.75rem;

    flex-wrap: wrap;

}





/* ── Footer site ──────────────────────────────────────────────── */

.site-footer {

    background: #1a3a2e;

    margin-top: 2rem;

    padding: 1.5rem 1rem;

}

.site-footer__inner {

    max-width: var(--max-w); margin: 0 auto;

    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;

    text-align: center;

}

.site-footer__logo {

    font-size: 1.1rem; font-weight: 700; color: #fff; text-decoration: none;

}

.site-footer__links {

    display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;

}

.site-footer__links a {

    font-size: 0.82rem; color: rgba(255,255,255,0.55); text-decoration: none;

    transition: color 0.15s;

}

.site-footer__links a:hover { color: #fff; }

.site-footer__copy { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin: 0; }



.mention {

    color: var(--green-mid);

    font-weight: 500;

    text-decoration: none;

}

.mention:hover { text-decoration: underline; }



/* ── Annuaire ─────────────────────────────────────────────────── */

.directory-page { display: flex; flex-direction: column; gap: 1.1rem; }



.directory-hero {

    background: var(--green-dark);

    border-radius: var(--radius-lg);

    padding: 1.5rem;

    display: flex; align-items: center; justify-content: space-between;

    gap: 1rem; flex-wrap: wrap;

}

.directory-hero__title { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0 0 0.25rem; }

.directory-hero__sub   { font-size: 0.85rem; color: rgba(255,255,255,0.65); margin: 0; }


/* ── Page centrée avec carte (invitations, création de groupe…) ── */

.invite-page {

    display: flex;

    flex-direction: column;

    gap: 1.1rem;

    max-width: 560px;

    margin: 0 auto;

    padding-top: 1.5rem;

}

.invite-card {

    background: #fff; border: 1px solid var(--gray-border); border-radius: var(--radius-lg);

    padding: 1.5rem; width: 100%;

    box-sizing: border-box;

}

.invite-card textarea.form__input { resize: vertical; font-family: inherit; width: 100%; box-sizing: border-box; }



@media (max-width: 600px) {

    .invite-page { padding-top: 2.5rem; }

}



/* Badges type annuaire */

.directory-card__type-badge, .directory-type-badge {

    font-size: 11px; font-weight: 700; padding: 3px 9px;

    border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;

}

.directory-type--audioprothesiste { background: #E6F1FB; color: #0C447C; }

.directory-type--orl               { background: #E1F5EE; color: #085041; }

.directory-type--interprete        { background: #E1F5EE; color: #0F6E56; }

.directory-type--association       { background: #EEEDFE; color: #3C3489; }

.directory-type--formateur         { background: #FAEEDA; color: #633806; }

.directory-type--accessibilite     { background: #FAECE7; color: #712B13; }

.directory-type--autre             { background: var(--gray-light); color: var(--gray-text); }



/* Carte annuaire — même style que job-card */

.directory-card {

    display: flex; flex-direction: column; gap: 0.5rem;

    background: var(--white); border: 1px solid var(--gray-border);

    border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;

    text-decoration: none; color: var(--black);

    transition: box-shadow 0.15s, border-color 0.15s;

    margin-bottom: 0.65rem;

}

.directory-card:hover { box-shadow: var(--shadow-sm); border-color: var(--green-border); text-decoration: none; }

.directory-card__body  { display: flex; flex-direction: column; gap: 0.4rem; }

.directory-card__name  { font-size: 1rem; font-weight: 600; color: var(--black); margin: 0; }

.directory-card__desc  { font-size: 0.875rem; color: var(--gray-mid); line-height: 1.5; }

.directory-card__footer {

    display: flex; align-items: center; justify-content: space-between;

    flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem;

    border-top: 1px solid var(--gray-light);

}

.directory-card__meta { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }



.sidebar-left__section-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6f8c81;
    padding: 0.75rem 0.7rem 0.15rem;
}


/* ── Modale de signalement — réutilisable sur tout le site ─────── */
.report-modal-overlay {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(10,14,12,0.55);
    display: flex; align-items: flex-end; justify-content: center;
}
.report-modal-overlay.hidden { display: none; }
.report-modal {
    background: #fff; width: 100%; max-width: 440px;
    border-radius: 20px 20px 0 0; padding: 0.5rem 1.25rem 1.5rem;
    animation: report-modal-up 0.2s ease;
}
@keyframes report-modal-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.report-modal__handle { width: 36px; height: 4px; background: var(--gray-border); border-radius: 2px; margin: 0.6rem auto 0.9rem; }
.report-modal__title { font-size: 1.05rem; font-weight: 800; color: var(--black); margin-bottom: 0.25rem; }
.report-modal__sub { font-size: 0.85rem; color: var(--gray-mid); margin-bottom: 1rem; }
.report-modal__reasons { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }
.report-modal__reason {
    text-align: left; padding: 0.8rem 1rem; border-radius: var(--radius-md);
    background: var(--gray-bg); border: none; font-size: 0.9rem; color: var(--black);
    cursor: pointer; font-family: var(--font); transition: background 0.12s;
}
.report-modal__reason:hover { background: var(--gray-light); }
.report-modal__cancel {
    width: 100%; padding: 0.75rem; background: none; border: none;
    color: var(--gray-mid); font-size: 0.85rem; font-weight: 600; cursor: pointer;
    font-family: var(--font);
}

@media (min-width: 600px) {
    .report-modal-overlay { align-items: center; }
    .report-modal { border-radius: 18px; max-width: 400px; }
    .report-modal__handle { display: none; }
}

/* ── Toast de confirmation (signalement envoyé) ─────────────────── */
.report-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--black); color: #fff; padding: 0.75rem 1.25rem;
    border-radius: 10px; font-size: 0.85rem; z-index: 700;
    opacity: 0; transition: opacity 0.25s, transform 0.25s;
    max-width: 90vw; text-align: center; box-shadow: var(--shadow-md);
}
.report-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Commentaires : indentation limitée (le JS met à plat à partir du 2e niveau) ── */
@media (max-width: 640px) {
    .comment-item__replies { padding-left: 0.6rem; gap: 0.5rem; }
    .comment-item__replies .comment-item__avatar { width: 26px; height: 26px; }
    .comment-item__replies .comment-item { gap: 0.4rem; }
}

/* ── « En réponse à @… » au-dessus d'une réponse profonde ── */
.comment-item__replyto { font-size: 0.72rem; color: var(--gray-mid); margin: 0 0 0.2rem 0.2rem; }
.comment-item__replyto a { color: var(--green-mid); font-weight: 600; text-decoration: none; }

/* ── Suggestions @mention ── */
.mention-box {
    position: fixed; z-index: 1000; max-height: 15rem; overflow-y: auto;
    background: #fff; border: 1px solid var(--gray-border); border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.14); padding: 0.25rem;
}
.mention-box[hidden] { display: none; }
.mention-box__item { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.55rem; border-radius: 8px; cursor: pointer; min-height: 44px; }
.mention-box__item.is-active, .mention-box__item:hover { background: var(--green-light); }
.mention-box__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mention-box__name { flex: 0 1 auto; min-width: 0; font-size: 0.88rem; font-weight: 600; color: var(--black); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-box__user { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.78rem; color: var(--gray-mid); white-space: nowrap; }
.mention-box__tag { margin-left: auto; font-size: 0.68rem; color: var(--green-mid); font-weight: 700; }

/* ── Noms longs (partenaires, groupes) : tronqués au lieu de déborder ── */
.post-card__author-group, .post-card__author { flex: 1 1 auto; min-width: 0; }
.post-card__author-group > div:last-child, .post-card__author > div:last-child { min-width: 0; flex: 1 1 auto; }
.post-card__author-group .post-card__name, .post-card__author .post-card__name,
.post-card__author-group .post-card__time, .post-card__author .post-card__time { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-item__body, .comment-item__bubble { min-width: 0; }
.comment-item__name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-item__text { overflow-wrap: anywhere; }
