/* Penta Com de l'appli mobile (communaute.php) : fil en lignes à filets, boutons plats, fenêtre de publication en bas d'écran. */

.pm-pc-composer { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.pm-pc-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ink3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: color-mix(in srgb, var(--white) 70%, transparent);
    text-decoration: none;
}
.pm-pc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-pc-avatar.petit { width: 26px; height: 26px; font-size: 11px; }
.pm-pc-composer button {
    flex: 1;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--rule2, var(--rule));
    border-radius: 6px;
    background: var(--ink2);
    color: color-mix(in srgb, var(--white) 55%, transparent);
    font: 500 14px/1.2 Inter, system-ui, sans-serif;
    cursor: pointer;
}
.pm-pc-connexion { padding: 18px 16px; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--white) 72%, transparent); }
.pm-pc-connexion a { display: inline-block; margin-top: 10px; padding: 9px 14px; border: 1px solid var(--white); border-radius: 6px; color: var(--white); font-weight: 700; text-decoration: none; }
.pm-pc-filtre { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--white); }
.pm-pc-filtre button { padding: 4px 8px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: transparent; color: var(--white); font: 700 12px/1 Inter, system-ui, sans-serif; }

/* Une publication */
.pm-post { padding: 14px 16px 6px; border-bottom: 1px solid var(--rule); }
.pm-post-tete { display: flex; align-items: center; gap: 10px; }
.pm-post-auteur { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-post-auteur a { font-size: 14px; font-weight: 800; color: var(--white); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-post-meta { font-size: 11px; color: color-mix(in srgb, var(--white) 50%, transparent); }
.pm-post-outils { display: flex; gap: 2px; }
.pm-post-outils button, .pm-icone {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: color-mix(in srgb, var(--white) 60%, transparent);
    font-size: 14px;
    cursor: pointer;
}
.pm-post-outils button.actif { color: var(--blue); }
.pm-post-texte { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--white); white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-post-texte a { color: var(--blue); font-weight: 600; text-decoration: none; }
.pm-post-texte textarea, .pm-post-texte select { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: var(--ink2); color: var(--white); font: 500 15px/1.4 Inter, system-ui, sans-serif; }
.pm-post-media { display: block; width: 100%; max-height: 420px; object-fit: cover; margin-top: 10px; border-radius: 4px; background: #000; }
.pm-post-lien { display: block; margin-top: 10px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; text-decoration: none; }
.pm-post-lien img { display: block; width: 100%; max-height: 160px; object-fit: cover; }
.pm-post-lien div { padding: 10px 12px; }
.pm-post-lien .pm-surtitre-cat { font-size: 10px; }
.pm-post-lien strong { display: block; font-size: 14px; color: var(--white); }
.pm-post-lien span { font-size: 12px; color: color-mix(in srgb, var(--white) 60%, transparent); }
.pm-sondage { margin-top: 10px; }
.pm-sondage-opt {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 9px 12px;
    border: 1px solid var(--rule2, var(--rule));
    border-radius: 6px;
    background: transparent;
    width: 100%;
    color: var(--white);
    font: 500 14px/1.3 Inter, system-ui, sans-serif;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
}
.pm-sondage-opt .pm-barre { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--blue) 18%, transparent); }
.pm-sondage-opt span { position: relative; }
.pm-sondage-opt.moi { border-color: var(--blue); }
.pm-sondage-total { font-size: 12px; color: color-mix(in srgb, var(--white) 50%, transparent); }
.pm-post-compteurs { display: flex; justify-content: space-between; margin-top: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 12px; color: color-mix(in srgb, var(--white) 55%, transparent); }
.pm-post-compteurs button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.pm-post-actions { display: flex; gap: 6px; padding: 4px 0 8px; }
.pm-post-actions button, .pm-post-actions > div > button.pm-react {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid var(--rule2, var(--rule));
    border-radius: 6px;
    background: transparent;
    color: var(--white);
    font: 700 12px/1 Inter, system-ui, sans-serif;
    cursor: pointer;
}
.pm-post-actions button.actif { border-color: var(--blue); color: var(--blue); }
.pm-react-wrap { position: relative; flex: 1; display: flex; }
.pm-react-wrap > button { flex: 1; }
.pm-react-choix { display: none; position: absolute; bottom: calc(100% + 6px); left: 0; gap: 2px; padding: 4px; border: 1px solid var(--rule); border-radius: 6px; background: var(--ink2); z-index: 20; }
.pm-react-wrap.ouvert .pm-react-choix { display: flex; }
.pm-react-choix button { width: 38px; height: 38px; border: 0; background: transparent; font-size: 20px; }
.pm-post-commentaires { padding: 6px 0 4px; border-top: 1px solid var(--rule); }
.pm-post-commentaires[hidden] { display: none; }
.pm-pc-com { display: flex; gap: 8px; padding: 6px 0; }
.pm-pc-com div { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; color: color-mix(in srgb, var(--white) 85%, transparent); }
.pm-pc-com strong { color: var(--white); }
.pm-pc-com-plus { background: none; border: 0; padding: 4px 0; color: var(--blue); font: 700 12px/1 Inter, system-ui, sans-serif; }
.pm-post-saisie { display: flex; gap: 8px; padding: 8px 0 6px; }
.pm-post-saisie input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: var(--ink2); color: var(--white); font: 500 14px/1.2 Inter, system-ui, sans-serif; }
.pm-post-saisie input:focus { outline: none; border-color: var(--blue); }
.pm-post-saisie button { padding: 0 14px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: transparent; color: var(--white); font: 700 12px/1 Inter, system-ui, sans-serif; }

.pm-pc-vide { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.pm-pc-attente { padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.pm-pc-attente span { display: block; height: 12px; margin-bottom: 8px; border-radius: 4px; background: var(--ink3); }
.pm-pc-plus { margin: 14px 16px 4px; }
.pm-pc-toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 1300; padding: 9px 14px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: var(--ink2); color: var(--white); font-size: 13px; font-weight: 700; }

/* Notifications Penta Com */
.pm-pc-notifs { position: relative; }
.pm-pc-notifs > button { position: relative; }
.pm-pc-notifs-nb { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--blue); color: var(--ink); font: 800 10px/16px Inter, system-ui, sans-serif; text-align: center; }
.pm-pc-notifs-nb[hidden] { display: none; }
.pm-pc-notifs-liste { position: absolute; right: 0; top: calc(100% + 6px); width: min(300px, calc(100vw - 32px)); max-height: 320px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--ink2); z-index: 60; }
.pm-pc-notifs-liste[hidden] { display: none; }
.pm-pc-notifs-liste header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-weight: 800; font-size: 13px; }
.pm-pc-notifs-liste header button { background: none; border: 0; color: var(--blue); font: 700 12px/1 Inter, system-ui, sans-serif; }
.pm-pc-notifs-liste a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--white); text-decoration: none; }
.pm-pc-notifs-liste a.nonlu { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.pm-pc-notifs-liste p { margin: 0; padding: 14px 12px; font-size: 13px; color: var(--muted); }

/* Fenêtre de publication : feuille en bas d'écran */
.pm-feuille { position: fixed; inset: 0; z-index: 1200; display: none; align-items: flex-end; background: rgba(0, 0, 0, .6); }
.pm-feuille.ouverte { display: flex; }
.pm-feuille-corps { width: 100%; max-height: 92vh; display: flex; flex-direction: column; background: var(--ink); border-top: 1px solid var(--rule2, var(--rule)); border-radius: 12px 12px 0 0; }
.pm-feuille-tete { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.pm-feuille-tete h2 { margin: 0; font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 400; letter-spacing: .04em; color: var(--white); }
.pm-feuille-tete button { background: none; border: 0; color: var(--white); font: 700 13px/1 Inter, system-ui, sans-serif; }
.pm-feuille-contenu { padding: 12px 16px; overflow-y: auto; flex: 1; }
.pm-feuille-contenu textarea { width: 100%; min-height: 110px; padding: 10px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: var(--ink2); color: var(--white); font: 500 16px/1.45 Inter, system-ui, sans-serif; resize: vertical; }
.pm-feuille-contenu textarea:focus, .pm-feuille-contenu input:focus, .pm-feuille-contenu select:focus { outline: none; border-color: var(--blue); }
.pm-feuille-ligne { display: flex; gap: 8px; margin-top: 10px; }
.pm-feuille-ligne select, .pm-feuille-contenu input[type="text"] { width: 100%; padding: 9px 10px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: var(--ink2); color: var(--white); font: 500 14px/1.2 Inter, system-ui, sans-serif; -webkit-appearance: none; appearance: none; }
.pm-feuille-outils { display: flex; gap: 6px; margin-top: 10px; }
.pm-feuille-outils button { flex: 1; padding: 9px 4px; border: 1px solid var(--rule2, var(--rule)); border-radius: 6px; background: transparent; color: var(--white); font: 700 12px/1 Inter, system-ui, sans-serif; }
.pm-feuille-outils button.actif { border-color: var(--blue); color: var(--blue); }
.pm-feuille-bloc { margin-top: 10px; padding: 10px; border: 1px solid var(--rule); border-radius: 6px; }
.pm-feuille-bloc[hidden] { display: none; }
.pm-feuille-bloc header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--white) 70%, transparent); }
.pm-feuille-bloc header button { background: none; border: 0; color: var(--blue); font: 700 12px/1 Inter, system-ui, sans-serif; }
.pm-feuille-bloc input { margin-bottom: 6px; }
.pm-feuille-bloc img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 4px; }
.pm-feuille-resultats button { display: block; width: 100%; margin-bottom: 4px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--ink2); color: var(--white); text-align: left; font: 500 13px/1.3 Inter, system-ui, sans-serif; }
.pm-feuille-resultats button.choisi { border-color: var(--blue); }
.pm-feuille-pied { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
.pm-mentions { margin-top: 4px; border: 1px solid var(--rule); border-radius: 6px; background: var(--ink2); max-height: 180px; overflow-y: auto; }
.pm-mentions[hidden] { display: none; }
.pm-mentions button { display: block; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--white); text-align: left; font: 500 13px/1.2 Inter, system-ui, sans-serif; }
.pm-mentions small { color: color-mix(in srgb, var(--white) 55%, transparent); }

/* Événements à venir */
.pm-pc-evt { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.pm-pc-evt-date { flex-shrink: 0; width: 44px; text-align: center; font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif; font-size: 22px; line-height: 1; color: var(--blue); }
.pm-pc-evt-date small { display: block; margin-top: 2px; font: 700 10px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--white) 55%, transparent); }
.pm-pc-evt strong { display: block; font-size: 14px; color: var(--white); }
.pm-pc-evt span { font-size: 12px; color: color-mix(in srgb, var(--white) 55%, transparent); }
.pm-pc-filtre[hidden], .pm-pc-plus[hidden] { display: none; }

/* Publication épinglée par la rédaction (components/pentacom/epingle.php) */
.pm-epingle { border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--ink2) 60%, transparent); }
.pm-epingle-titre { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.pm-epingle-titre i { font-size: 10px; }
.pm-epingle .pm-post-lien { margin-bottom: 10px; }

/* Encart « Reliez votre fiche officielle » (components/pentacom/relier_fiche.php) */
.pm-relier-fiche { margin: 12px 16px; padding: 14px 16px; border: 1px solid var(--rule2, var(--rule)); border-left: 3px solid var(--blue); border-radius: 10px; }
.pm-relier-fiche h2 { margin: 0 0 4px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.pm-relier-fiche p { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: color-mix(in srgb, var(--white) 75%, transparent); }
.pm-relier-fiche .pm-bouton-profil { display: block; width: 100%; margin: 0 0 8px; text-align: center; }
.pm-relier-fiche-autre { display: inline-block; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
