.community-hero{padding:58px max(24px,calc((100vw - 1180px)/2));background:linear-gradient(125deg,#07345b,#0b5f99);color:#fff;position:relative;overflow:hidden}
.community-hero:after{content:"";position:absolute;right:8%;top:22%;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.06)}
.community-hero .eyebrow{color:#a8ddff;font-weight:700}.community-hero h1{font-size:clamp(2.2rem,5vw,3.8rem);margin:.35rem 0}.community-hero p{max-width:720px;line-height:1.65;font-size:1.08rem}
.community-layout{max-width:1180px;margin:30px auto 80px;padding:0 24px;display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:26px;align-items:start}
.community-tabs{display:flex;gap:8px;border-bottom:1px solid #d6e3ed;margin-bottom:18px}.community-tabs button{border:0;background:transparent;padding:14px 18px;font:inherit;font-weight:700;cursor:pointer;color:#476075;border-bottom:3px solid transparent}.community-tabs button[aria-selected=true]{color:#075b9d;border-bottom-color:#075b9d}
.community-filters{display:flex;gap:12px;margin-bottom:18px}.community-filters input,.community-filters select{font:inherit;min-height:44px;border:1px solid #cbd9e5;border-radius:10px;padding:8px 12px;background:#fff}.community-filters input{flex:1;min-width:100px}.community-filters select{max-width:220px}
#community-posts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.community-card,.community-aside section{background:#fff;border:1px solid #dce6ed;border-radius:16px;box-shadow:0 8px 28px #12314a0d}.community-card{overflow:hidden;display:flex;flex-direction:column;min-width:0}.community-card-inner{padding:18px}.community-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.82rem;color:#476075}.community-author{font-weight:800;color:#125484}.community-chip{display:inline-block;background:#eaf4fa;color:#175477;padding:5px 9px;border-radius:999px;font-size:.78rem;margin:2px}.community-date{margin-left:auto;color:#6c7f8e}.community-title{margin:12px 0 9px;font-size:1.22rem;line-height:1.3;color:#12314a}.community-image{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}.community-body{white-space:pre-line;line-height:1.6;color:#293e4d;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden}.community-more{border:0;background:transparent;color:#086aa7;font-weight:800;padding:10px 0 0;cursor:pointer;text-align:left}.community-body.expanded{-webkit-line-clamp:unset;display:block}.community-replies{border-top:1px solid #e0e8ee;margin-top:14px;padding-top:12px}.community-replies h3{font-size:.95rem}.community-reply{padding:9px 10px;background:#f3f8fb;border-radius:9px}.community-aside section{padding:20px;margin-bottom:16px}.community-aside h2{font-size:1.05rem;margin:0 0 10px}.community-aside p,.community-aside li{line-height:1.55}.community-aside ul{padding-left:19px}.community-empty{grid-column:1/-1;background:#f4f8fb;padding:24px;border-radius:12px}.community-aside a{color:#126ca6}
@media(min-width:1180px){.community-layout{grid-template-columns:minmax(0,1fr) 260px}#community-posts{grid-template-columns:repeat(3,minmax(0,1fr))}.community-title{font-size:1.12rem}.community-body{font-size:.93rem;-webkit-line-clamp:6}}
@media(max-width:850px){.community-layout{grid-template-columns:1fr}.community-aside{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}.community-aside section{margin:0}}
@media(max-width:620px){.community-hero{padding:42px 20px}.community-layout{padding:0 15px;margin-top:22px}.community-tabs button{padding:12px 8px;font-size:.91rem}.community-filters{flex-direction:column}.community-filters select{max-width:none}#community-posts{grid-template-columns:1fr}.community-title{font-size:1.2rem}}

/* C43 R5 — densification éditoriale validée sur capture réelle R4 */
.community-hero{padding-top:42px;padding-bottom:42px}.community-hero h1{font-size:clamp(2rem,4vw,3.2rem)}.community-hero p{margin-bottom:0}
.community-layout{max-width:1320px;grid-template-columns:minmax(0,1fr) 245px;gap:20px;margin-top:24px}.community-tabs{margin-bottom:14px}.community-filters{margin-bottom:14px}
#community-posts{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.community-card{border-radius:14px}.community-card-inner{padding:15px}.community-title{font-size:1.08rem;margin:10px 0 7px}.community-body{font-size:.91rem;line-height:1.5;-webkit-line-clamp:5}.community-more{font-size:.9rem;padding-top:8px}.community-image{aspect-ratio:16/8.5}.community-aside section{padding:17px;margin-bottom:13px}.community-aside p,.community-aside li{font-size:.92rem}.community-aside h2{font-size:1rem}
@media(min-width:1450px){.community-layout{max-width:1420px;grid-template-columns:minmax(0,1fr) 250px}#community-posts{grid-template-columns:repeat(4,minmax(0,1fr))}.community-title{font-size:1.03rem}.community-body{font-size:.88rem;-webkit-line-clamp:5}}
@media(max-width:1050px){#community-posts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.community-layout{grid-template-columns:1fr}#community-posts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){#community-posts{grid-template-columns:1fr}.community-hero h1{font-size:2rem}}
.community-card.shared-publication{outline:3px solid #1d6cff;outline-offset:3px;box-shadow:0 12px 34px rgba(29,108,255,.18);scroll-margin:120px 0}

/* C43 R7.1 — respiration intérieure des cartes */
.community-card-inner{padding:19px 21px 20px}
.community-card>.community-meta,.community-card>.community-title,.community-card>.community-body,.community-card>.community-replies{margin-left:20px;margin-right:20px}
.community-card>.community-meta{margin-top:18px}
.community-card>.community-replies{margin-bottom:18px}
@media(max-width:620px){
  .community-card-inner{padding:17px 18px 19px}
  .community-card>.community-meta,.community-card>.community-title,.community-card>.community-body,.community-card>.community-replies{margin-left:17px;margin-right:17px}
}

/* C43 R7.2 — cartes uniformes */
#community-posts{align-items:stretch;grid-auto-rows:1fr}
.community-card{height:100%;display:flex;flex-direction:column}
.community-card .community-image{width:100%;height:155px;aspect-ratio:auto;object-fit:cover;flex:0 0 155px}
.community-card .community-title{min-height:2.65em}
.community-card .community-body{height:7.5em;min-height:7.5em;max-height:7.5em;overflow:hidden}
.community-card .community-replies{margin-top:auto}
@media(max-width:620px){
 .community-card .community-image{height:180px;flex-basis:180px}
 .community-card .community-title{min-height:auto}
 .community-card .community-body{height:7.5em;min-height:7.5em;max-height:7.5em}
}

/* C43 R7.3 — Lire la suite */
.community-more{margin:10px 20px 17px;padding:0;border:0;background:transparent;color:#086aa7;font:inherit;font-weight:800;cursor:pointer;text-align:left;align-self:flex-start}
.community-more:hover{text-decoration:underline}
.community-card.is-expanded{height:auto;grid-row:span 2}
.community-card.is-expanded .community-body{height:auto;min-height:0;max-height:none;overflow:visible}
@media(max-width:620px){.community-more{margin-left:17px;margin-right:17px}}

/* C43 R7.4 — bouton toujours après le texte */
.community-card.is-expanded{height:auto;grid-row:auto}
.community-card.is-expanded .community-body{height:auto;min-height:0;max-height:none;overflow:visible}
.community-card.is-expanded .community-more{order:20;margin-top:12px;margin-bottom:18px}
.community-card.is-expanded .community-replies{order:30;margin-top:auto}

/* C43 R7.5 — expansion réelle du corps, sans superposition */
.community-card.is-expanded .community-body{
 display:block!important;
 -webkit-line-clamp:unset!important;
 -webkit-box-orient:initial!important;
 height:auto!important;min-height:0!important;max-height:none!important;
 overflow:visible!important;
}
.community-card.is-expanded .community-more{position:static!important;display:block;order:initial;margin:12px 20px 18px!important}
@media(max-width:620px){.community-card.is-expanded .community-more{margin-left:17px!important;margin-right:17px!important}}

/* C43 R7.5b — en mode ouvert, aucun ancien gabarit fixe */
#community-posts .community-card.is-expanded{height:auto!important;align-self:start!important}
#community-posts .community-card.is-expanded .community-body.expanded{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset!important}
#community-posts .community-card.is-expanded .community-more{position:relative!important;inset:auto!important;float:none!important;transform:none!important;clear:both!important;margin-top:14px!important}
 
/* C43 R7.6 partage */ 
.community-share{margin:0 20px 18px;padding:8px 12px;border:1px solid #cbdceb;border-radius:9px;background:#f4f9fd;color:#075f98;font:inherit;font-weight:700;cursor:pointer;align-self:flex-start} 
.community-share:hover{background:#e9f4fb} 
 
/* C43 R7.9 publication partagee */ 
.community-card.shared-publication{outline:3px solid #1677d2;outline-offset:3px;box-shadow:0 10px 30px rgba(8,82,145,.18)} 

/* C43 Espace étudiants */
.community-layout .community-filters{grid-row:1}.community-layout #student-compose{grid-row:2}.community-layout #community-posts{grid-row:3}
.student-compose{margin:0 0 20px;padding:20px;border:1px solid #d9e4ef;border-radius:18px;background:#fff}.student-compose-head{display:flex;justify-content:space-between;gap:16px;align-items:center}.student-compose-head h2{margin:0 0 4px}.student-compose-head p{margin:0;color:#607080}.student-new-post,.student-form-actions button,.community-reply-button,.community-reply-form button{border:0;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;background:#1266b3;color:#fff}.student-compose form{margin-top:18px;display:grid;gap:12px}.student-compose form[hidden]{display:none}.student-compose label{display:grid;gap:6px;font-weight:700}.student-compose input,.student-compose select,.student-compose textarea,.community-reply-form textarea{width:100%;box-sizing:border-box;border:1px solid #cbd8e5;border-radius:10px;padding:11px;font:inherit}.student-form-actions{display:flex;gap:10px}.student-form-actions #student-cancel{background:#eef3f8;color:#203040}.community-replies{border-top:1px solid #e5edf4;margin-top:14px;padding-top:14px}.community-replies h3{font-size:1rem;margin:0 0 10px}.community-reply{background:#f6f9fc;border-radius:10px;padding:10px 12px;margin:8px 0}.community-reply p{margin:4px 0 0}.community-reply-form{display:grid;gap:8px;margin-top:10px}.community-reply-status{margin:0;color:#607080}@media(max-width:620px){.student-compose-head{align-items:stretch;flex-direction:column}.student-new-post{width:100%}}

.community-chip-important{background:#fff2cc!important;color:#6b4b00!important;border:1px solid #e8c65a!important;font-weight:900}.community-card:has(.community-chip-important){border:1px solid #e8c65a;box-shadow:0 8px 24px rgba(0,0,0,.07)}
