/* ==========================================================================
   Pôle Étude — charte
   Encre #14213D · Craie #F6F4EE · Ambre #E9A23B · Sauge #2E8B57 · Brique #C0392B
   Titres : Fraunces · Texte : Plus Jakarta Sans
   ========================================================================== */
:root {
    --pe-ink: #14213D;
    --pe-ink-soft: #2B3A5C;
    --pe-chalk: #F6F4EE;
    --pe-paper: #FFFFFF;
    --pe-amber: #E9A23B;
    --pe-amber-dark: #C9831C;
    --pe-sage: #2E8B57;
    --pe-brick: #C0392B;
    --pe-line: #E6E2D8;
    --pe-muted: #6B7280;
    --pe-radius: 14px;
    --pe-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .05);
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    --bs-body-color: #1E2433;
    --bs-link-color-rgb: 20, 33, 61;
    --bs-primary: #14213D;
    --bs-primary-rgb: 20, 33, 61;
}

body { background: var(--pe-chalk); color: #1E2433; font-size: .95rem; }
h1, h2, h3, .pe-title { font-family: 'Fraunces', Georgia, serif; font-weight: 700; color: var(--pe-ink); letter-spacing: -.01em; }
h4, h5, h6 { font-weight: 700; color: var(--pe-ink); }
a { color: var(--pe-ink); text-decoration: none; }
a:hover { color: var(--pe-amber-dark); }
.pe-main { min-height: 70vh; padding-bottom: 3rem; }
.text-muted, .text-body-secondary { color: var(--pe-muted) !important; }

/* ---------- Navigation */
.pe-navbar { background: var(--pe-ink); padding: .55rem 0; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.pe-navbar .nav-link { color: rgba(255,255,255,.82) !important; font-weight: 500; border-radius: 8px; padding: .45rem .7rem !important; }
.pe-navbar .nav-link:hover, .pe-navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.08); }
.pe-navbar .navbar-toggler { color: #fff; border: 0; }
.pe-brand { color: #fff !important; font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.pe-brand em { font-style: normal; color: var(--pe-amber); }
.pe-brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--pe-amber); color: var(--pe-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.pe-search { position: relative; min-width: 260px; }
.pe-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.55); }
.pe-search .form-control { padding-left: 36px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: 999px; }
.pe-search .form-control::placeholder { color: rgba(255,255,255,.55); }
.pe-search .form-control:focus { background: rgba(255,255,255,.16); box-shadow: none; border-color: var(--pe-amber); }
.pe-navbar .dropdown-menu { border: 0; box-shadow: var(--pe-shadow); border-radius: 12px; }

/* ---------- Boutons (texte des boutons colorés toujours blanc, y compris au survol) */
.btn { border-radius: 10px !important; font-weight: 600 !important; }
.btn-accent, .btn-accent:focus { background: var(--pe-amber) !important; border-color: var(--pe-amber) !important; color: var(--pe-ink) !important; }
.btn-accent:hover { background: var(--pe-amber-dark) !important; border-color: var(--pe-amber-dark) !important; color: #fff !important; }
.btn-ink, .btn-ink:focus { background: var(--pe-ink) !important; border-color: var(--pe-ink) !important; color: #fff !important; }
.btn-ink:hover { background: var(--pe-ink-soft) !important; color: #fff !important; }
.btn-primary, .btn-primary:hover, .btn-success, .btn-success:hover, .btn-danger, .btn-danger:hover { color: #fff !important; }
.btn-primary { background: var(--pe-ink) !important; border-color: var(--pe-ink) !important; }
.btn-ghost { background: transparent !important; border: 1px solid var(--pe-line) !important; color: var(--pe-ink) !important; }
.btn-ghost:hover { background: #fff !important; border-color: var(--pe-ink) !important; }
.btn-ghost.active { background: var(--pe-ink) !important; color: #fff !important; }

/* ---------- Cartes */
.pe-card { background: var(--pe-paper); border: 1px solid var(--pe-line); border-radius: var(--pe-radius); box-shadow: var(--pe-shadow); }
.pe-card-body { padding: 1.1rem 1.2rem; }
.pe-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pe-muted); font-weight: 700; margin-bottom: .7rem; }

/* ---------- Fil : 3 colonnes */
.pe-feed-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; padding-top: 1.25rem; }
.pe-sticky { position: sticky; top: 80px; }
@media (max-width: 1199.98px) { .pe-feed-grid { grid-template-columns: 230px minmax(0, 1fr); } .pe-feed-right { display: none; } }
@media (max-width: 991.98px) { .pe-feed-grid { grid-template-columns: minmax(0, 1fr); } .pe-feed-left-desktop { display: none; } }

.pe-filter-list { list-style: none; padding: 0; margin: 0; }
.pe-filter-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 10px; cursor: pointer; font-weight: 500; color: #333; user-select: none; }
.pe-filter-item:hover { background: var(--pe-chalk); }
.pe-filter-item.active { background: var(--pe-ink); color: #fff; }
.pe-filter-item .pe-dot { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; flex-shrink: 0; }
.pe-filter-item .pe-count { margin-left: auto; font-size: .75rem; opacity: .7; }

/* ---------- Carte de contenu (fil) */
.pe-post { background: #fff; border: 1px solid var(--pe-line); border-radius: var(--pe-radius); box-shadow: var(--pe-shadow); overflow: hidden; margin-bottom: 1rem; }
.pe-post-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem .6rem; }
.pe-post-head .pe-who { line-height: 1.2; min-width: 0; }
.pe-post-head .pe-who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-post-head .pe-who small { color: var(--pe-muted); }
.pe-type-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; color: #fff; white-space: nowrap; }
.pe-post-cover { height: 220px; background-size: cover; background-position: center; position: relative; display: block; }
.pe-post-cover.pe-fallback { display: flex; align-items: center; justify-content: center; }
.pe-post-cover.pe-fallback i { font-size: 3.4rem; color: rgba(255,255,255,.9); }
.pe-post-body { padding: .9rem 1.1rem; }
.pe-post-body h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.pe-post-body p { color: #4B5563; margin-bottom: .6rem; }
.pe-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: #4B5563; }
.pe-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.pe-post-foot { display: flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem .9rem; border-top: 1px solid var(--pe-line); }
.pe-post-foot .pe-stat { font-size: .85rem; color: var(--pe-muted); display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .5rem; border-radius: 8px; }
.pe-post-foot .pe-cta { margin-left: auto; }

/* ---------- Barre de progression campagne */
.pe-progress { height: 8px; background: #EEE9DC; border-radius: 99px; overflow: hidden; }
.pe-progress > div { height: 100%; background: linear-gradient(90deg, var(--pe-sage), #5CC08A); border-radius: 99px; }

/* ---------- Sidebar droite : rangées compactes image en fond + dégradé horizontal */
.pe-mini { display: flex; align-items: flex-end; min-height: 74px; border-radius: 12px; overflow: hidden; margin-bottom: .55rem; background-size: cover; background-position: center; position: relative; color: #fff !important; }
.pe-mini::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,16,32,.88) 0%, rgba(10,16,32,.55) 60%, rgba(10,16,32,.15) 100%); }
.pe-mini-body { position: relative; padding: .55rem .75rem; width: 100%; }
.pe-mini-body strong { display: block; font-size: .86rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pe-mini-body small { opacity: .85; font-size: .72rem; }
.pe-mini:hover { color: #fff !important; filter: brightness(1.08); }

/* ---------- Avatars / logos */
.pe-avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--pe-ink-soft); color: #fff; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.pe-logo { border-radius: 12px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--pe-ink); border: 1px solid var(--pe-line); font-weight: 800; flex-shrink: 0; overflow: hidden; }

/* ---------- Page organisation / profil : cover + logo */
.pe-cover { height: 250px; border-radius: 0 0 var(--pe-radius) var(--pe-radius); background: linear-gradient(135deg, var(--pe-ink) 0%, #31507F 55%, var(--pe-amber) 140%); background-size: cover; background-position: center; position: relative; }
.pe-cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.35) 100%); }
.pe-identity { display: flex; align-items: flex-start; gap: 1.1rem; margin-top: -60px; position: relative; z-index: 2; padding: 0 1rem; flex-wrap: wrap; }
.pe-identity .pe-logo, .pe-identity .pe-avatar { border: 4px solid #fff; box-shadow: var(--pe-shadow); }
.pe-identity-text { padding-top: 68px; flex: 1; min-width: 220px; }
.pe-identity-text h1 { font-size: 1.8rem; margin: 0; }
.pe-identity-actions { padding-top: 72px; display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 767.98px) { .pe-cover { height: 170px; } .pe-identity { margin-top: -45px; } .pe-identity-text { padding-top: 0; flex-basis: 100%; } .pe-identity-actions { padding-top: 0; } }
.pe-tabs { border-bottom: 1px solid var(--pe-line); gap: .25rem; }
.pe-tabs .nav-link { border: 0; color: var(--pe-muted); font-weight: 600; padding: .75rem 1rem; border-bottom: 3px solid transparent; border-radius: 0; }
.pe-tabs .nav-link.active { color: var(--pe-ink); border-bottom-color: var(--pe-amber); background: transparent; }

/* ---------- Grille d'organisations */
.pe-org-card { display: block; background: #fff; border: 1px solid var(--pe-line); border-radius: var(--pe-radius); overflow: hidden; box-shadow: var(--pe-shadow); height: 100%; }
.pe-org-card .pe-org-banner { height: 90px; background: linear-gradient(135deg, var(--pe-ink), #31507F); background-size: cover; background-position: center; }
.pe-org-card .pe-org-logo-wrap { margin-top: -32px; padding: 0 1rem; }
.pe-org-card .pe-org-body { padding: .5rem 1rem 1rem; }

/* ---------- Quiz */
.pe-question { border: 1px solid var(--pe-line); border-radius: 12px; padding: 1rem; margin-bottom: .9rem; background: #fff; }
.pe-option { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--pe-line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .45rem; cursor: pointer; }
.pe-option:hover { border-color: var(--pe-ink); }
.pe-option.selected { border-color: var(--pe-ink); background: #EEF1F7; }
.pe-option.correct { border-color: var(--pe-sage); background: #E8F5EE; }
.pe-option.wrong { border-color: var(--pe-brick); background: #FBEAEA; }
.pe-score-ring { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 0 auto; font-family: 'Fraunces', serif; }

/* ---------- Vote */
.pe-vote-option { border: 1px solid var(--pe-line); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .5rem; position: relative; overflow: hidden; background: #fff; }
.pe-vote-bar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(233, 162, 59, .18); z-index: 0; }
.pe-vote-option > * { position: relative; z-index: 1; }

/* ---------- Contenu riche */
.pe-prose { line-height: 1.75; font-size: 1rem; }
.pe-prose p { margin-bottom: 1rem; }
.pe-hero-cover { height: 340px; border-radius: var(--pe-radius); background-size: cover; background-position: center; }
@media (max-width: 767.98px) { .pe-hero-cover { height: 210px; } }

/* ---------- Admin */
.pe-admin-grid { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 1.25rem; padding-top: 1.25rem; align-items: start; }
@media (max-width: 991.98px) { .pe-admin-grid { grid-template-columns: minmax(0,1fr); } .pe-admin-side-desktop { display: none; } }
.pe-admin-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 10px; color: #333; font-weight: 500; }
.pe-admin-nav a:hover { background: var(--pe-chalk); }
.pe-admin-nav a.active { background: var(--pe-ink); color: #fff; }
.pe-kpi { padding: 1rem 1.1rem; }
.pe-kpi .pe-kpi-value { font-family: 'Fraunces', serif; font-size: 1.9rem; font-weight: 700; color: var(--pe-ink); line-height: 1; }
.pe-kpi .pe-kpi-label { color: var(--pe-muted); font-size: .8rem; margin-top: .3rem; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pe-muted); font-weight: 700; background: #FAF8F3 !important; }

/* ---------- Formulaires */
.form-control, .form-select { border-radius: 10px; border-color: #DDD8CB; }
.form-control:focus, .form-select:focus { border-color: var(--pe-ink); box-shadow: 0 0 0 .2rem rgba(20,33,61,.1); }
.form-label { font-weight: 600; font-size: .88rem; }
.pe-type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.pe-type-choice { border: 2px solid var(--pe-line); border-radius: 12px; padding: .8rem; text-align: center; cursor: pointer; background: #fff; font-weight: 600; font-size: .88rem; }
.pe-type-choice i { display: block; font-size: 1.6rem; margin-bottom: .3rem; }
.pe-type-choice.active { border-color: var(--pe-ink); background: #EEF1F7; }
.pe-builder-row { border: 1px dashed #CFC8B6; border-radius: 12px; padding: .9rem; margin-bottom: .8rem; background: #FCFBF8; }

.pe-empty { text-align: center; padding: 2.5rem 1rem; color: var(--pe-muted); }
.pe-empty i { font-size: 2.4rem; display: block; margin-bottom: .5rem; opacity: .6; }
.pe-footer { background: #0F1A30; color: rgba(255,255,255,.66); padding: 3rem 0 1.2rem; font-size: .86rem; margin-top: 2rem; }
.pe-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.pe-footer a:hover { color: var(--pe-amber); }
.pe-footer h6 { color: #fff; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; }
.pe-footer ul { list-style: none; padding: 0; margin: 0; }
.pe-footer ul li { margin-bottom: .38rem; }
.pe-footer .pe-footer-sub { padding-left: .7rem; font-size: .8rem; }
.pe-footer-brand { display: inline-flex; align-items: center; gap: .5rem; font-family: 'Fraunces', serif; font-size: 1.35rem; color: #fff !important; }
.pe-footer-brand em { color: var(--pe-amber); }
.pe-footer-contact li { display: flex; gap: .55rem; align-items: baseline; }
.pe-footer-contact i { color: var(--pe-amber); }
.pe-footer-socials { display: flex; gap: .45rem; margin-top: 1rem; }
.pe-footer-socials a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1rem; }
.pe-footer-socials a:hover { background: var(--pe-amber); color: #0F1A30; }
.pe-footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1rem; border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.2rem; padding-top: 1.1rem; font-size: .78rem; }
.pe-auth { max-width: 460px; margin: 2.5rem auto; }

/* ==========================================================================
   Page d'accueil
   ========================================================================== */
.pe-hero .carousel-item { transition-duration: .7s; }
.pe-hero-slide { height: 400px; border-radius: 20px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3rem 3.5rem 4rem; color: #fff; overflow: hidden; }
.pe-hero-text { max-width: 620px; position: relative; z-index: 2; }
.pe-hero-kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pe-amber); background: rgba(233,162,59,.14); border: 1px solid rgba(233,162,59,.35); padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1rem; }
.pe-hero-text h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: .8rem; }
.pe-hero-text p { font-size: 1.08rem; color: rgba(255,255,255,.82); margin: 0; }
.pe-btn-glass { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.3) !important; color: #fff !important; }
.pe-btn-glass:hover { background: rgba(255,255,255,.2) !important; color: #fff !important; }
.pe-hero-art { position: relative; width: 260px; height: 260px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pe-hero-rings { position: absolute; inset: 0; width: 100%; height: 100%; }
.pe-hero-art i { font-size: 6rem; color: var(--pe-amber); position: relative; }
.pe-hero .carousel-indicators { margin-bottom: 1.2rem; }
.pe-hero .carousel-indicators [data-bs-target] { width: 26px; height: 5px; border-radius: 3px; border: 0; }
.pe-hero .carousel-control-prev, .pe-hero .carousel-control-next { width: 5%; }
@media (max-width: 767.98px) {
    .pe-hero-slide { height: 360px; padding: 2rem 1.4rem 3.2rem; border-radius: 16px; }
    .pe-hero-art { display: none; }
    .pe-hero .carousel-control-prev, .pe-hero .carousel-control-next { display: none; }
}

.pe-hero-bar { position: relative; z-index: 3; margin: -34px auto 0; max-width: 1080px; background: #fff; border: 1px solid var(--pe-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(20,33,61,.12); padding: 1rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: center; }
.pe-hero-search { position: relative; display: flex; gap: .5rem; }
.pe-hero-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pe-muted); }
.pe-hero-search .form-control { padding-left: 40px; height: 48px; border-radius: 12px; }
.pe-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.pe-hero-stats div { border-left: 1px solid var(--pe-line); padding: 0 .4rem; }
.pe-hero-stats div:first-child { border-left: 0; }
.pe-hero-stats strong { display: block; font-family: 'Fraunces', serif; font-size: 1.45rem; color: var(--pe-ink); line-height: 1.1; }
.pe-hero-stats span { font-size: .72rem; color: var(--pe-muted); }
@media (max-width: 991.98px) { .pe-hero-bar { grid-template-columns: 1fr; margin-top: -26px; } }
@media (max-width: 575.98px) { .pe-hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: .6rem; } .pe-hero-stats div:nth-child(3) { border-left: 0; } .pe-hero-search .btn { display: none; } }

.pe-home-section { padding: 2rem 0 .5rem; }
.pe-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pe-home-head h2 { font-size: 1.55rem; margin: 0; }
.pe-home-head p { margin: .15rem 0 0; color: var(--pe-muted); }
.pe-home-head-icon { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }

/* Accès rapides */
.pe-type-tiles { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: .6rem; }
.pe-type-tile { background: #fff; border: 1px solid var(--pe-line); border-radius: 14px; padding: .8rem .4rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .35rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pe-type-tile:hover { transform: translateY(-3px); box-shadow: var(--pe-shadow); border-color: var(--tile); color: var(--pe-ink); }
.pe-type-tile-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--tile); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.pe-type-tile strong { font-size: .76rem; line-height: 1.15; }
.pe-type-tile small { color: var(--pe-muted); font-size: .72rem; }
@media (max-width: 1199.98px) { .pe-type-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .pe-type-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Cartes affiche (hauteur fixe en px — pas d'étirement flex hérité) */
.pe-poster { height: 330px; background: #fff; border: 1px solid var(--pe-line); border-top: 4px solid var(--pe-ink); border-radius: 14px; overflow: hidden; box-shadow: var(--pe-shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pe-poster:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(20,33,61,.14); }
.pe-poster-visual { height: 170px; flex-shrink: 0; background-size: cover; background-position: center; position: relative; display: block; color: #fff !important; }
.pe-poster-badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.pe-poster-star { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--pe-amber); color: var(--pe-ink); display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.pe-poster-icon { position: absolute; right: 14px; top: 42px; font-size: 3.4rem; color: rgba(255,255,255,.22); }
.pe-poster-title { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; color: #fff; font-family: 'Fraunces', serif; font-size: 1.02rem; line-height: 1.25; text-shadow: 0 1px 6px rgba(0,0,0,.35); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pe-poster-body { padding: .7rem .85rem .8rem; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pe-poster-info { font-size: .8rem; color: #374151; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-poster-deadline { font-size: .74rem; color: var(--pe-brick); margin-top: .15rem; }
.pe-poster-foot { margin-top: auto; display: flex; align-items: center; gap: .5rem; }
.pe-poster-who { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--pe-muted); min-width: 0; flex: 1; }
.pe-poster-who .pe-logo, .pe-poster-who .pe-avatar { border-radius: 7px; }
.pe-poster-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1199.98px) { .pe-poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .pe-poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .pe-poster { height: 300px; } .pe-poster-visual { height: 150px; } }
@media (max-width: 420px) { .pe-poster-grid { grid-template-columns: minmax(0, 1fr); } }

/* Rail horizontal (défilement tactile / molette natif, barre masquée) */
.pe-rail { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.pe-rail::-webkit-scrollbar { display: none; }
.pe-rail-item { flex: 0 0 270px; scroll-snap-align: start; }

/* Appels à l'action */
.pe-home-cta { display: flex; gap: 1.2rem; padding: 1.6rem; border-radius: 18px; height: 100%; }
.pe-home-cta > i { font-size: 2.4rem; line-height: 1; }
.pe-home-cta h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.pe-home-cta p { margin-bottom: 1rem; }
.pe-home-cta-ink { background: var(--pe-ink); color: rgba(255,255,255,.85); }
.pe-home-cta-ink h3 { color: #fff; }
.pe-home-cta-ink > i { color: var(--pe-amber); }
.pe-home-cta-amber { background: #FBEBCF; color: #4A3A1A; border: 1px solid #F2D29A; }
.pe-home-cta-amber > i { color: var(--pe-amber-dark); }

/* Navigation : libellés sur une ligne */
.pe-navbar .nav-link, .pe-navbar .btn { white-space: nowrap; }
.pe-search { min-width: 200px; max-width: 280px; flex: 1; }
@media (max-width: 1199.98px) { .pe-search { max-width: none; } }
.pe-rail-item { max-width: 270px; min-width: 0; }
.pe-poster, .pe-poster-body { min-width: 0; }

/* ==========================================================================
   Engagement : header types, menu ⋮, prix, 18+, partage, portefeuille, chat,
   parcours, vérification, visites, challenges
   ========================================================================== */
.pe-typebar { background: #fff; border-bottom: 1px solid var(--pe-line); position: sticky; top: 58px; z-index: 1019; }
.pe-typebar-scroll { display: flex; gap: .1rem; justify-content: space-between; overflow-x: auto; scrollbar-width: none; padding: .45rem 0; }
.pe-typebar-scroll::-webkit-scrollbar { display: none; }
.pe-typebar-link { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .78rem; font-weight: 600; color: #374151; padding: .32rem .55rem; border-radius: 999px; border: 1px solid transparent; }
.pe-typebar-link i { color: var(--type); }
.pe-typebar-link:hover { border-color: var(--type); color: var(--pe-ink); }
.pe-typebar-link.active { background: var(--type); color: #fff; }
.pe-typebar-link.active i { color: #fff; }
@media (max-width: 1199.98px) { .pe-typebar { position: static; } }

.pe-points-chip { font-weight: 700 !important; color: var(--pe-amber) !important; }
.pe-nav-badge { position: absolute; top: 2px; right: 0; background: #e74c3c; color: #fff; font-size: .62rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; line-height: 1.3; }

.pe-dots { display: inline-block; }
.pe-dots-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--pe-muted); display: inline-flex; align-items: center; justify-content: center; }
.pe-dots-btn:hover, .pe-dots-btn[aria-expanded="true"] { background: var(--pe-chalk); color: var(--pe-ink); }
.pe-dots-sm .pe-dots-btn { width: 28px; height: 28px; }
.pe-dots .dropdown-menu { font-size: .88rem; border-radius: 12px; border: 1px solid var(--pe-line); }

.pe-price-chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: #FBEBCF; color: #8A5A0B; border: 1px solid #F2D29A; white-space: nowrap; }
.pe-price-chip.free { background: #E8F5EE; color: #1E6B43; border-color: #BFE3CD; }
.pe-age-chip { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 800; padding: .2rem .45rem; border-radius: 6px; background: var(--pe-brick); color: #fff; }
.pe-poster-tags { position: absolute; top: 10px; right: 10px; display: flex; gap: .3rem; align-items: center; }
.pe-poster-tags .pe-poster-star { position: static; }
.pe-post-foot .pe-price-chip, .pe-post-foot .pe-age-chip { margin-left: .2rem; }

.pe-paywall { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: linear-gradient(135deg, #FFF8EA, #FBEBCF); border: 1px solid #F2D29A; flex-wrap: wrap; }
.pe-paywall-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--pe-amber); color: var(--pe-ink); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.pe-paywall-compact { padding: .8rem; }
.pe-locked-preview { position: relative; max-height: 7.5em; overflow: hidden; }
.pe-locked-preview::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3.5em; background: linear-gradient(180deg, rgba(255,255,255,0), #fff); }
.pe-age-badge { width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--pe-brick); color: var(--pe-brick); font-weight: 900; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; }

.pe-share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.pe-share-btn { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .3rem; border-radius: 12px; border: 1px solid var(--pe-line); font-size: .8rem; font-weight: 600; color: #333; cursor: pointer; }
.pe-share-btn i { font-size: 1.4rem; color: var(--net); }
.pe-share-btn:hover { border-color: var(--net); color: var(--pe-ink); }
.pe-qr-img { border: 1px solid var(--pe-line); border-radius: 12px; padding: 6px; background: #fff; }

/* Portefeuille */
.pe-wallet-card { background: radial-gradient(circle at 90% 10%, rgba(233,162,59,.45), rgba(233,162,59,0) 50%), linear-gradient(135deg, #14213D, #0B1428); color: #fff; border-radius: 18px; padding: 1.5rem; }
.pe-wallet-balance { font-family: 'Fraunces', serif; font-size: 2.8rem; font-weight: 700; line-height: 1.1; margin: .3rem 0; }
.pe-wallet-balance span { font-size: 1.8rem; }
.pe-pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.pe-pack { border: 2px solid var(--pe-line); border-radius: 12px; padding: .7rem; text-align: center; cursor: pointer; display: flex; flex-direction: column; }
.pe-pack strong { font-size: 1.1rem; color: var(--pe-ink); }
.pe-pack span { font-size: .8rem; color: var(--pe-muted); }
.btn-check:checked + .pe-pack { border-color: var(--pe-amber); background: #FFF8EA; }
.pe-gift-code { font-size: .95rem; font-weight: 700; letter-spacing: .08em; background: #14213D; color: #E9A23B; padding: .2rem .5rem; border-radius: 6px; }

/* Messagerie */
.pe-chat { display: flex; height: calc(100vh - 170px); min-height: 480px; background: #fff; border: 1px solid var(--pe-line); border-radius: var(--pe-radius); overflow: hidden; box-shadow: var(--pe-shadow); }
.pe-chat-list { width: 330px; flex-shrink: 0; border-right: 1px solid var(--pe-line); display: flex; flex-direction: column; }
.pe-chat-rows { overflow-y: auto; flex: 1; }
.pe-chat-row { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; padding: .7rem 1rem; border-bottom: 1px solid #F1EEE6; }
.pe-chat-row:hover { background: #FAF8F3; }
.pe-chat-row.active { background: #EEF1F7; }
.pe-unread { display: inline-block; background: #e74c3c; color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-top: 2px; }
.pe-chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pe-chat-head { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--pe-line); }
.pe-chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column-reverse; gap: .6rem; background: #F4F6F9; }
.pe-msg { display: flex; gap: .45rem; align-items: flex-end; max-width: 78%; }
.pe-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.pe-bubble { background: #fff; border-radius: 12px; padding: .55rem .8rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); word-wrap: break-word; }
.pe-msg.mine .pe-bubble { background: var(--pe-ink); color: #fff; }
.pe-msg-meta { font-size: .7rem; color: var(--pe-muted); margin-top: 2px; }
.pe-msg.mine .pe-msg-meta { text-align: right; }
.pe-msg-report { font-size: .7rem !important; vertical-align: baseline; }
.pe-chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--pe-line); flex-wrap: wrap; }
.pe-chat-form textarea { flex: 1; resize: none; }
@media (max-width: 767.98px) { .pe-chat-list { width: 100%; border-right: 0; } .pe-msg { max-width: 92%; } }

/* Parcours & vérification */
.pe-timeline-dot { width: 40px; height: 40px; border-radius: 12px; background: #EEF1F7; color: var(--pe-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pe-timeline-dot.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .85rem; }
.pe-verif-icon { width: 52px; height: 52px; border-radius: 14px; background: #F1EEE6; color: var(--pe-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.pe-verif-icon.ok { background: #E8F5EE; color: var(--pe-sage); }

/* Visites & challenges */
.pe-pulse { animation: pePulse 1.8s ease-in-out infinite; }
@keyframes pePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(233,162,59,.55); } 50% { box-shadow: 0 0 0 14px rgba(233,162,59,0); } }
.pe-challenge-hero { background: radial-gradient(circle at 85% 30%, rgba(233,162,59,.35), rgba(233,162,59,0) 45%), linear-gradient(120deg, #14213D, #0B1428); background-size: cover; background-position: center; color: #fff; border-radius: 20px; padding: 2rem 2.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.pe-challenge-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: .3rem 0 .6rem; }
.pe-challenge-hero p { color: rgba(255,255,255,.85); max-width: 640px; }
.pe-challenge-hero > i { font-size: 5rem; color: var(--pe-amber); }
.pe-challenge-card { display: block; background: #fff; border: 1px solid var(--pe-line); border-radius: var(--pe-radius); overflow: hidden; box-shadow: var(--pe-shadow); height: 100%; }
.pe-challenge-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(20,33,61,.14); }
.pe-challenge-visual { height: 150px; background: linear-gradient(135deg, #14213D, #31507F); background-size: cover; background-position: center; padding: .8rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.pe-challenge-visual h3 { color: #fff; font-size: 1.15rem; margin-top: auto; }
.pe-org-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; max-height: 440px; overflow-y: auto; }
.pe-org-pick { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--pe-line); border-radius: 12px; padding: .5rem .7rem; cursor: pointer; }
.pe-org-pick:has(input:checked) { border-color: var(--pe-ink); background: #EEF1F7; }
.pe-todo-hot { border-color: #F5B7B1 !important; background: #FFF6F5 !important; }


/* ---------- Diapositives d'accueil : même taille pour toutes (texte tronqué) */
.pe-hero-text h1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pe-hero-text p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 767.98px) { .pe-hero-text p { -webkit-line-clamp: 2; } .pe-hero-text .btn-lg { padding: .45rem .9rem; font-size: .95rem; } }
.pe-hero-wrap { padding-top: 1.2rem; }

/* ---------- Menu déroulant des types de contenus */
.pe-types-menu { min-width: 440px; padding: .5rem; display: none; grid-template-columns: 1fr 1fr; gap: 2px; }
.pe-types-menu.show { display: grid; }
.pe-types-menu .dropdown-item { display: flex; align-items: center; gap: .55rem; border-radius: 8px; padding: .45rem .6rem; font-size: .9rem; }
.pe-types-menu .dropdown-item i { color: var(--type); font-size: 1.05rem; width: 1.2rem; text-align: center; }
@media (max-width: 1199.98px) { .pe-types-menu { min-width: 0; grid-template-columns: 1fr; } }

/* ---------- Page d'information */
.pe-page-body { line-height: 1.7; }
.pe-page-body h2 { font-size: 1.35rem; margin-top: 1.6rem; }
.pe-page-body h3 { font-size: 1.1rem; margin-top: 1.2rem; }

/* ---------- Accès au contenu (gratuit / payant / abonnés) */
.pe-access-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.pe-access-choice { border: 1.5px solid var(--pe-line); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; transition: border-color .15s, background .15s; }
.pe-access-choice:hover { border-color: #C9CFDA; }
.pe-access-choice.active { border-color: var(--pe-ink); background: #EEF1F7; }
.pe-access-choice small { color: var(--pe-muted); font-size: .76rem; line-height: 1.3; }

/* ---------- Formules d'abonnement */
.pe-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.pe-plan-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.pe-plan { border: 1.5px solid var(--pe-line); border-radius: 14px; padding: .9rem; text-align: center; background: #fff; display: flex; flex-direction: column; gap: .15rem; }
.pe-plan:hover { border-color: var(--pe-amber); }
.pe-plan-name { font-weight: 700; color: var(--pe-ink); }
.pe-plan-price { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--pe-ink); line-height: 1.1; }
.pe-plan-price span { font-size: 1rem; }
.pe-plan-duration { font-size: .78rem; color: var(--pe-muted); margin-bottom: .4rem; }
.pe-plan form { margin-top: auto; }
.pe-plan-compact { padding: .6rem; }
.pe-plan-compact .pe-plan-price { font-size: 1.2rem; }

/* ---------- Professeurs, mentors, tuteurs */
.pe-creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.pe-creator-card { display: block; text-align: center; background: #fff; border: 1px solid var(--pe-line); border-radius: var(--pe-radius); padding: 1.1rem .8rem; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.pe-creator-card:hover { transform: translateY(-2px); box-shadow: var(--pe-shadow); color: inherit; }
.pe-creator-card .pe-avatar, .pe-creator-card img { margin: 0 auto; }

/* ---------- Salons de discussion */
.pe-room-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: #E8ECF5; color: var(--pe-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.pe-room-icon.adult { background: #FDE2E1; color: #B42318; }
.pe-chat-tabs { display: flex; gap: 4px; background: #F1F3F7; padding: 3px; border-radius: 10px; }
.pe-chat-tabs button { flex: 1; border: 0; background: transparent; border-radius: 8px; font-size: .8rem; font-weight: 600; padding: .3rem; color: var(--pe-muted); }
.pe-chat-tabs button.active { background: #fff; color: var(--pe-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pe-chat-info { padding: .9rem 1rem; border-bottom: 1px solid var(--pe-line); background: #FAFBFD; max-height: 45%; overflow-y: auto; }
.pe-msg-author { font-size: .72rem; font-weight: 700; color: var(--pe-ink); margin-bottom: 2px; }
.pe-msg.mine .pe-msg-author { display: none; }
.pe-msg-image { display: block; max-width: 240px; max-height: 220px; border-radius: 8px; margin-top: .3rem; object-fit: cover; }
.pe-msg-file { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; background: rgba(0,0,0,.05); padding: .3rem .55rem; border-radius: 8px; margin-top: .3rem; color: inherit; text-decoration: none; }
.pe-msg.mine .pe-msg-file { background: rgba(255,255,255,.14); color: #fff; }
.pe-bubble.deleted { background: transparent !important; color: var(--pe-muted) !important; font-style: italic; border: 1px dashed var(--pe-line); box-shadow: none; }

/* ---------- QR code de profil / organisation / salon */
.pe-qr-dialog { border-radius: 20px; overflow: hidden; }
.pe-qr-dialog .modal-body { background: linear-gradient(180deg, #EEF1F7 0%, #fff 45%); }
.pe-qr-identity { display: flex; justify-content: center; }
.pe-qr-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(20,33,61,.15); }
.pe-qr-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--pe-ink); color: #fff; font-weight: 700; font-size: 1.5rem; }

/* ---------- Montants rapides (campagnes, boost) */
.pe-amount-chips { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- QR code avec le logo du site au centre */
.pe-qr-frame { position: relative; display: inline-block; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--pe-line); box-shadow: 0 6px 18px rgba(20,33,61,.08); line-height: 0; }
.pe-qr-frame .pe-qr-code { display: block; width: var(--qr-size, 220px); height: var(--qr-size, 220px); }
.pe-qr-frame .pe-qr-logo { position: absolute; left: 50%; top: 50%; width: calc(var(--qr-size, 220px) * .22); height: calc(var(--qr-size, 220px) * .22); transform: translate(-50%, -50%); background: #fff; padding: 3px; border-radius: 22%; box-shadow: 0 0 0 2px #fff; }
.pe-brand-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }

/* ---------- Boost de publications */
.pe-boost-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px; background: linear-gradient(90deg, #E9A23B, #F2C46D); color: #14213D; white-space: nowrap; }
.pe-boost-status { border-left: 4px solid var(--pe-line); }
.pe-boost-status.active { border-left-color: var(--pe-amber); background: #FFF8EC; }
.pe-boost-icon { width: 46px; height: 46px; border-radius: 14px; background: #14213D; color: var(--pe-amber); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.pe-boost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; }
.pe-boost-tier { background: #fff; border: 1.5px solid var(--pe-line); border-radius: var(--pe-radius); padding: 1.1rem; display: flex; flex-direction: column; text-align: center; }
.pe-boost-tier.featured { border-color: var(--pe-amber); box-shadow: 0 8px 24px rgba(233,162,59,.18); }
.pe-boost-label { font-weight: 700; color: var(--pe-ink); }
.pe-boost-price { font-family: 'Fraunces', serif; font-size: 1.8rem; color: var(--pe-ink); line-height: 1.15; }
.pe-boost-price span { font-size: 1.1rem; }
.pe-sponsored-item { display: block; border-radius: 12px; padding: .6rem .7rem; background: #FFF8EC; border: 1px solid #F3DDB5; margin-bottom: .5rem; color: inherit; text-decoration: none; }
.pe-sponsored-item:hover { border-color: var(--pe-amber); color: inherit; }

/* ---------- Webinaires */
.pe-webinar { display: flex; align-items: center; gap: .9rem; padding: .8rem; border: 1px solid var(--pe-line); border-radius: 14px; margin-bottom: .6rem; background: #fff; }
.pe-webinar.live { border-color: #E4574B; box-shadow: 0 0 0 3px rgba(228,87,75,.12); }
.pe-webinar-link { color: inherit; text-decoration: none; }
.pe-webinar-link:hover { color: inherit; border-color: #C9CFDA; }
.pe-webinar-date { width: 54px; flex-shrink: 0; text-align: center; background: #14213D; color: #fff; border-radius: 12px; padding: .35rem 0; line-height: 1.1; }
.pe-webinar-date strong { display: block; font-family: 'Fraunces', serif; font-size: 1.35rem; }
.pe-webinar-date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pe-amber); }
.pe-webinar-actions { text-align: right; flex-shrink: 0; }
.pe-webinar-form { background: #FAFBFD; border: 1px dashed var(--pe-line); border-radius: 12px; padding: .8rem; }
.pe-webinar-room { position: relative; width: 100%; height: calc(100vh - 230px); min-height: 480px; border-radius: var(--pe-radius); overflow: hidden; background: #0B1428; }
.pe-webinar-room iframe { width: 100%; height: 100%; border: 0; }
.pe-pulse { animation: pe-pulse 1.6s infinite; }
@keyframes pe-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,53,69,.5); } 70% { box-shadow: 0 0 0 10px rgba(220,53,69,0); } 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); } }
@media (max-width: 575.98px) { .pe-webinar { flex-wrap: wrap; } .pe-webinar-actions { width: 100%; text-align: left; } }
.min-w-0 { min-width: 0; }

/* ---------- Téléphone avec indicatif pays */
.pe-phone-btn { border: 1px solid var(--bs-border-color); background: #fff; font-weight: 600; white-space: nowrap; }
.pe-phone-menu { width: 300px; }
.pe-phone-list { max-height: 260px; overflow-y: auto; }
.pe-phone-list .dropdown-item { border-radius: 8px; font-size: .9rem; }
.pe-phone-flag { font-size: 1.15rem; line-height: 1; }
.pe-auth-tabs { display: flex; gap: 4px; background: #F1F3F7; padding: 3px; border-radius: 10px; margin-bottom: 1rem; }
.pe-auth-tabs label { flex: 1; text-align: center; border-radius: 8px; font-size: .88rem; font-weight: 600; padding: .4rem; color: var(--pe-muted); cursor: pointer; margin: 0; }
.pe-auth-tabs input:checked + label { background: #fff; color: var(--pe-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pe-auth-pane { display: none; }
.pe-auth-form:has(#via-email:checked) .pe-auth-pane[data-pane="email"],
.pe-auth-form:has(#via-phone:checked) .pe-auth-pane[data-pane="phone"] { display: block; }

/* ---------- Admin › Paramètres */
.pe-settings-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.pe-settings-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: 999px; background: #fff; border: 1px solid var(--pe-line); color: var(--pe-ink); font-size: .85rem; font-weight: 600; text-decoration: none; }
.pe-settings-tabs a.active { background: var(--pe-ink); color: #fff; border-color: var(--pe-ink); }
.pe-settings-checks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.pe-settings-rows td, .pe-settings-rows th { white-space: nowrap; }
.pe-settings-rows .pe-settings-checks { white-space: normal; min-width: 360px; gap: .2rem .7rem; }
.pe-settings-matrix th:first-child { min-width: 170px; }
.pe-setting + .pe-setting { border-top: 1px dashed var(--pe-line); padding-top: 1rem; }

/* Listes filtrables : un élément masqué le reste même avec .d-flex */
[data-filter-text][hidden] { display: none !important; }

/* ---------- Date de publication */
.pe-date { white-space: nowrap; }
.pe-date .bi { font-size: .85em; }
.pe-poster-date { font-size: .74rem; color: var(--pe-muted); margin-bottom: .15rem; }

/* ---------- Organisations liées / contenus réservés aux membres */
.pe-org-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem .2rem .25rem; border: 1px solid var(--pe-line); border-radius: 999px; background: #fff; font-size: .8rem; font-weight: 600; color: var(--pe-ink); text-decoration: none; }
.pe-org-chip:hover { border-color: #C9CFDA; color: var(--pe-ink); }
.pe-org-chip .btn-close { font-size: .55rem; margin-left: .15rem; }
.pe-members-chip { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px; background: #E6F4EA; color: #1E6B3A; white-space: nowrap; }
.pe-members-badge { width: 72px; height: 72px; border-radius: 50%; background: #E6F4EA; color: #1E6B3A; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.pe-linked-orgs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pe-org-results { max-height: 220px; overflow-y: auto; border: 1px solid var(--pe-line); border-radius: 10px; }
.pe-org-results button { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; background: #fff; padding: .4rem .6rem; text-align: left; font-size: .88rem; }
.pe-org-results button:hover { background: #F4F6F9; }
.pe-audience-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }

/* ---------- Projets et tâches (Kanban) */
.pe-project-card { color: inherit; text-decoration: none; transition: box-shadow .15s; }
.pe-project-card:hover { color: inherit; box-shadow: var(--pe-shadow); }
.pe-project-swatch { width: 14px; height: 40px; border-radius: 6px; }
.pe-task-new { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(110px, 1fr)) auto; gap: .5rem; }
@media (max-width: 991.98px) { .pe-task-new { grid-template-columns: 1fr 1fr; } .pe-task-new input[type=text] { grid-column: 1 / -1; } }
.pe-board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; }
.pe-board-col { background: #F1F3F7; border-radius: 14px; padding: .6rem; min-height: 320px; display: flex; flex-direction: column; transition: background .15s; }
.pe-board-col.drag-over { background: #E3E9F5; outline: 2px dashed #9AA8C4; }
.pe-board-col header { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .88rem; padding: .2rem .3rem .6rem; }
.pe-board-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--col); }
.pe-board-list { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.pe-board-empty { border: 1.5px dashed #CBD2DE; border-radius: 10px; padding: 1rem; text-align: center; color: var(--pe-muted); font-size: .8rem; }
.pe-task { background: #fff; border-radius: 10px; padding: .6rem .65rem; box-shadow: 0 1px 2px rgba(0,0,0,.07); border: 1px solid transparent; cursor: grab; }
.pe-task.active { border-color: var(--pe-amber); }
.pe-task.overdue { border-left: 3px solid #DC3545; }
.pe-task.dragging { opacity: .45; }
.pe-task-open { border: 0; background: transparent; padding: 0; text-align: left; width: 100%; font-size: .9rem; color: var(--pe-ink); }
.pe-task-move { border: 0; background: #F1F3F7; border-radius: 6px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--pe-muted); }
.pe-task-move:hover { background: #E3E9F5; color: var(--pe-ink); }
.pe-task-backdrop { position: fixed; inset: 0; background: rgba(15,26,48,.35); z-index: 1040; }
.pe-task-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: #fff; z-index: 1045; padding: 1.2rem; overflow-y: auto; box-shadow: -8px 0 30px rgba(15,26,48,.2); }

/* ---------- Web TV */
.pe-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0B1428; border-radius: 14px; overflow: hidden; }
.pe-video-frame iframe, .pe-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pe-video-locked { background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; text-align: center; }
.pe-video-locked::before { content: ''; position: absolute; inset: 0; background: rgba(11,20,40,.72); }
.pe-video-locked > div { position: relative; font-weight: 600; }
.pe-video-locked .bi { font-size: 2.2rem; color: var(--pe-amber); }
.pe-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E4574B; box-shadow: 0 0 0 0 rgba(228,87,75,.6); animation: pe-live 1.6s infinite; vertical-align: middle; }
@keyframes pe-live { 0% { box-shadow: 0 0 0 0 rgba(228,87,75,.6); } 70% { box-shadow: 0 0 0 8px rgba(228,87,75,0); } 100% { box-shadow: 0 0 0 0 rgba(228,87,75,0); } }
.pe-live-badge { display: inline-flex; align-items: center; gap: .35rem; background: #E4574B; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 6px; }
.pe-tv-hero { background: #0B1428; border-radius: 20px; padding: 1.2rem; color: #fff; }
.pe-tv-hero h1, .pe-tv-hero h2 { color: #fff; }
.pe-tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.pe-tv-card { display: block; color: inherit; text-decoration: none; }
.pe-tv-card:hover { color: inherit; }
.pe-tv-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: #1F2A44 center / cover no-repeat; overflow: hidden; }
.pe-tv-thumb .pe-tv-duration { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: .72rem; font-weight: 700; padding: .05rem .35rem; border-radius: 4px; }
.pe-tv-thumb .pe-tv-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: rgba(255,255,255,.9); opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.25); }
.pe-tv-card:hover .pe-tv-play { opacity: 1; }
.pe-tv-thumb .pe-tv-tags { position: absolute; left: 6px; top: 6px; display: flex; gap: .25rem; }
.pe-tv-meta { display: flex; gap: .6rem; margin-top: .5rem; }
.pe-tv-meta strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .93rem; line-height: 1.3; }
.pe-channel-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; }
.pe-channel-card { display: flex; align-items: center; gap: .7rem; padding: .7rem; border-radius: 14px; background: #fff; border: 1px solid var(--pe-line); color: inherit; text-decoration: none; }
.pe-channel-card:hover { color: inherit; border-color: #C9CFDA; }
.pe-channel-cover { height: 220px; border-radius: var(--pe-radius); background: linear-gradient(135deg, var(--ch, #C0392B), #0B1428) center / cover no-repeat; }
.pe-program { display: flex; gap: .8rem; padding: .55rem .2rem; border-bottom: 1px solid var(--pe-line); }
.pe-program.on-air { background: #FFF3F2; border-radius: 10px; padding-left: .6rem; }
.pe-program time { width: 92px; flex-shrink: 0; font-weight: 700; font-size: .85rem; }
.pe-tv-cats { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Questions avec médias (quiz et exercices) */
.pe-q-thumb { max-width: 160px; max-height: 110px; border-radius: 8px; object-fit: cover; border: 1px solid var(--pe-line); }
.pe-q-media img { max-width: 100%; max-height: 320px; border-radius: 10px; margin-bottom: .6rem; }
.pe-q-media .pe-video-frame { max-width: 560px; margin-bottom: .6rem; }
.pe-tf-choices { display: flex; gap: .6rem; }
.pe-tf-choices label { flex: 1; max-width: 180px; text-align: center; border: 1.5px solid var(--pe-line); border-radius: 10px; padding: .55rem; cursor: pointer; font-weight: 600; }
.pe-tf-choices input:checked + label { border-color: var(--pe-ink); background: #EEF1F7; }
.pe-answer-ok { color: #16A34A; }
.pe-answer-ko { color: #DC3545; }
/* ---------- Rendus d'exercices */
.pe-submission-status { border: 1px solid var(--pe-line); border-left: 4px solid #D97706; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; background: #FFFBF3; }
.pe-submission-status.graded { border-left-color: #16A34A; background: #F3FBF5; }
.pe-score { font-family: 'Fraunces', serif; font-size: 1.6rem; color: var(--pe-ink); line-height: 1; }
.pe-score small { font-size: .9rem; color: var(--pe-muted); }
.pe-given-text { background: #F7F8FA; border: 1px solid var(--pe-line); border-radius: 10px; padding: .6rem .8rem; white-space: pre-line; }
.pe-option-readonly { cursor: default; }
.pe-option-readonly.correct { border-color: #16A34A; background: #F0FAF3; }
.pe-option-readonly.wrong { border-color: #DC3545; background: #FDF1F2; }

/* ---------- Espace compte : colonne de gauche */
.pe-account-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 991.98px) { .pe-account-grid { grid-template-columns: 1fr; } .pe-account-side { display: none; } }
.pe-account-points { display: flex; align-items: center; justify-content: space-between; background: #FFF8EC; border: 1px solid #F3DDB5; border-radius: 12px; padding: .5rem .75rem; color: var(--pe-ink); text-decoration: none; font-size: .85rem; }
.pe-account-points:hover { color: var(--pe-ink); border-color: var(--pe-amber); }
.pe-account-page > .row:first-child { margin-top: 0; }

/* ---------- Tableau de bord de l'espace compte */
.pe-dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 991.98px) { .pe-dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pe-dash-kpi { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.pe-dash-kpi:hover { color: inherit; box-shadow: var(--pe-shadow); transform: translateY(-1px); }
.pe-dash-kpi .pe-kpi-value { font-size: 1.45rem; }
.pe-todo-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--pe-line); color: var(--pe-ink); text-decoration: none; font-size: .9rem; }
.pe-todo-item:hover { background: #FAFBFD; color: var(--pe-ink); }
.pe-todo-icon { width: 30px; height: 30px; border-radius: 9px; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .9rem; }

/* ---------- Fils de réponses aux commentaires */
.pe-comment-reply { border-left: 2px solid #E3E8F0; padding-left: .7rem; }
.pe-comment-actions { font-size: .8rem; margin-top: .1rem; }
.pe-comment-actions .btn-link { font-size: .8rem; color: var(--pe-muted); text-decoration: none; }
.pe-comment-actions .btn-link:hover { color: var(--pe-ink); }

/* Concours : rangs, classement, carte publique */
.pe-rank-table tbody { counter-reset: rank; }
.pe-rank-table tbody tr { counter-increment: rank; }
.pe-rank-cell::before { content: counter(rank) "e"; }
.pe-rank-table tbody tr:first-child .pe-rank-cell::before { content: "1er"; }
.pe-leaderboard li + li { border-top: 1px solid #EEF1F6; }
.pe-leaderboard-rank { width: 1.8rem; text-align: center; font-weight: 700; color: #5B6B85; }
.pe-leaderboard-me { background: #FFF8E6; border-radius: .4rem; padding-left: .3rem; padding-right: .3rem; }
.pe-contest-card { border: 1px solid #F2D27A; background: linear-gradient(180deg, #FFFBF0, #fff 60%); }
.pe-prize { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; }
.pe-prize + .pe-prize { border-top: 1px dashed #EADFBF; }
.pe-claim-code { font-family: ui-monospace, monospace; font-size: 1.15rem; letter-spacing: .08em; background: #14213D; color: #fff; padding: .25rem .6rem; border-radius: .35rem; }
.pe-rank-table tr:has(option[value="gift"]:checked) [data-kind="points"],
.pe-rank-table tr:has(option[value="points"]:checked) [data-kind="gift"] { display: none; }

/* Scolarité : bulletins, relevés, diplômes (impression) */
.pe-doc { background: #fff; border: 1px solid #DCE2EC; border-radius: .6rem; padding: 2rem; max-width: 960px; margin: 0 auto 1.5rem; }
.pe-doc-head { display: flex; align-items: center; gap: 1rem; border-bottom: 3px double #14213D; padding-bottom: .8rem; margin-bottom: 1rem; }
.pe-doc-head h1 { font-size: 1.25rem; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
.pe-doc table { font-size: .88rem; }
.pe-doc th { background: #F3F5F9; font-weight: 700; }
.pe-doc .pe-doc-total td { font-weight: 700; background: #FFF8E6; }
.pe-doc-sign { display: flex; justify-content: space-between; margin-top: 2rem; font-size: .85rem; }
.pe-doc-sign > div { width: 45%; border-top: 1px solid #8A94A6; padding-top: .3rem; text-align: center; color: #5B6B85; }
.pe-diploma { background: radial-gradient(circle at top, #FFFDF5, #FFF 60%); border: 12px double #C9A227; border-radius: .4rem; padding: 2.5rem 2rem; text-align: center; max-width: 900px; margin: 0 auto; position: relative; }
.pe-diploma h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 2.3rem; color: #14213D; margin: .6rem 0; }
.pe-diploma .pe-diploma-name { font-family: Georgia, serif; font-size: 1.9rem; color: #9A6B00; border-bottom: 1px solid #E8D9A8; display: inline-block; padding: 0 1.5rem .2rem; }
.pe-diploma-revoked { position: absolute; inset: 40% 10% auto; transform: rotate(-12deg); font-size: 2.6rem; font-weight: 800; color: rgba(220, 53, 69, .55); border: 6px solid rgba(220, 53, 69, .55); border-radius: .6rem; }
.pe-program-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .2rem; }
.pe-program-item + .pe-program-item { border-top: 1px solid #EEF1F6; }
.pe-program-check { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #C9D2E0; color: #fff; flex: none; }
.pe-program-check.done { background: #1E8E5A; border-color: #1E8E5A; }
.pe-grade-input { max-width: 90px; }
.pe-grade-table td, .pe-grade-table th { white-space: nowrap; }
.pe-mode-badge { background: #E6F3F5; color: #155E75; }
@media print {
    .pe-navbar, .pe-typebar, .pe-footer, .pe-no-print, .alert { display: none !important; }
    body { background: #fff !important; }
    .container-xl { max-width: none !important; padding: 0 !important; }
    .pe-doc { border: 0; padding: 0; margin: 0; max-width: none; }
    .pe-page-break { page-break-after: always; }
    a { color: inherit !important; text-decoration: none !important; }
}

/* Pages de liste des contenus (/explorer/…) */
.pe-list-hero { background: linear-gradient(120deg, var(--type) 0%, #14213D 120%); color: #fff; padding: 1.6rem 0 1rem; }
.pe-list-hero a:not(.btn) { color: #fff; }
.pe-list-crumbs { opacity: .8; }
.pe-list-icon { width: 58px; height: 58px; border-radius: 16px; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; flex: none; }
.pe-list-types { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.pe-list-types::-webkit-scrollbar { display: none; }
.pe-list-types a { white-space: nowrap; font-size: .82rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: rgba(255,255,255,.12); text-decoration: none; }
.pe-list-types a.active, .pe-list-types a:hover { background: #fff; color: #14213D; }
.pe-list-filters .form-label { font-size: .8rem; font-weight: 700; margin-bottom: .2rem; color: #374151; }
@media (min-width: 992px) { .pe-list-filters { position: sticky; top: 120px; } }
.pe-filter-chip { font-size: .8rem; background: #EEF2F8; border: 1px solid #D6DEEA; color: #14213D; border-radius: 999px; padding: .15rem .6rem; text-decoration: none; }
.pe-filter-chip:hover { background: #FDECEC; border-color: #F3B9B9; }
@media (min-width: 1200px) { .pe-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pe-list-row { display: flex; align-items: center; gap: .9rem; padding: .75rem 1rem; color: inherit; text-decoration: none; }
.pe-list-row + .pe-list-row { border-top: 1px solid var(--pe-line); }
.pe-list-row:hover { background: #F7F9FC; }
.pe-list-row:hover .pe-list-title { text-decoration: underline; }
.pe-list-thumb { width: 84px; height: 60px; border-radius: 10px; background-size: cover; background-position: center; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; }
.min-w-0 { min-width: 0; }

/* Auteur / éditeur cliquable dans les blocs de contenus */
.pe-author-link { color: inherit; text-decoration: none; font-weight: 600; }
.pe-author-link:hover { text-decoration: underline; color: var(--pe-ink, #14213D); cursor: pointer; }
.pe-author-over { position: relative; z-index: 2; }
a.pe-poster-who:hover span { text-decoration: underline; color: var(--pe-ink, #14213D); }
.pe-list-row, .pe-tv-card { position: relative; }
.pe-list-title { color: inherit; text-decoration: none; }
.pe-tv-title { color: inherit; text-decoration: none; }
/* Rangée compacte : le lien du titre couvre tout le bloc, l'éditeur reste cliquable par-dessus */
.pe-mini-body { position: static; }
.pe-mini-body > * { position: relative; z-index: 1; }
.pe-mini-body > .pe-mini-title { position: static; color: #fff; text-decoration: none; }
.pe-mini-body > .pe-mini-title strong { position: relative; z-index: 1; }
.pe-mini .pe-author-link { color: #fff; }
.pe-mini .pe-author-over { z-index: 3; }
/* (repris de Bootstrap pour ne pas dépendre du CDN) */
.stretched-link::after { position: absolute; inset: 0; z-index: 1; content: ""; }

/* Admin : options de fond d'une diapositive selon le type choisi (couleur / image / vidéo) */
.pe-slide-form .pe-media-opt { display: none; }
.pe-slide-form:has(input[name="media_type"][value="color"]:checked) .pe-media-opt[data-for~="color"],
.pe-slide-form:has(input[name="media_type"][value="image"]:checked) .pe-media-opt[data-for~="image"],
.pe-slide-form:has(input[name="media_type"][value="video"]:checked) .pe-media-opt[data-for~="video"] { display: revert; }

/* ==========================================================================
   Bannière d'accueil : diapositives empilées, fondu enchaîné (fade in)
   ========================================================================== */
.pe-hero { position: relative; height: var(--hero-h, 420px); border-radius: 20px; overflow: hidden; background: #0B1428; isolation: isolate; }
.pe-hero-track { position: absolute; inset: 0; }
.pe-hero-item { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity var(--hero-fade, 1000ms) ease-in-out, visibility 0s linear var(--hero-fade, 1000ms); z-index: 0; }
.pe-hero-item.is-active { opacity: 1; visibility: visible; transition: opacity var(--hero-fade, 1000ms) ease-in-out, visibility 0s; z-index: 1; }
.pe-hero-media { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); transition: transform 8s ease-out; }
.pe-hero-item.is-active .pe-hero-media { transform: scale(1); }
.pe-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; pointer-events: none; }
/* iframe (YouTube…) : on agrandit pour couvrir comme un object-fit: cover */
.pe-hero-iframe { width: 177.78vh; min-width: 100%; height: 56.25vw; min-height: 100%; left: 50%; top: 50%; inset: auto; transform: translate(-50%, -50%); }
.pe-hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,16,32, var(--veil)) 0%, rgba(10,16,32, calc(var(--veil) * .7)) 50%, rgba(10,16,32, calc(var(--veil) * .2)) 100%); }
.pe-hero-veil-center { background: rgba(10,16,32, var(--veil)); }
.pe-hero-veil-right { background: linear-gradient(270deg, rgba(10,16,32, var(--veil)) 0%, rgba(10,16,32, calc(var(--veil) * .7)) 50%, rgba(10,16,32, calc(var(--veil) * .2)) 100%); }
.pe-hero-veil.is-light { background: rgba(255,255,255, var(--veil)); }
.pe-hero-slide { position: relative; height: 100%; border-radius: 0; background: none !important; z-index: 2; }
.pe-hero-slide.pe-align-center { justify-content: center; text-align: center; }
.pe-hero-slide.pe-align-center .pe-hero-actions { justify-content: center; }
.pe-hero-slide.pe-align-right { flex-direction: row-reverse; text-align: right; }
.pe-hero-slide.pe-align-right .pe-hero-actions { justify-content: flex-end; }
.pe-hero-dark, .pe-hero-dark .pe-hero-text h1 { color: #14213D; }
.pe-hero-dark .pe-hero-text p { color: rgba(20,33,61,.8); }
.pe-hero-dark .pe-btn-glass { background: rgba(20,33,61,.06) !important; border-color: rgba(20,33,61,.3) !important; color: #14213D !important; }
/* le texte apparaît en fondu, légèrement décalé, à chaque diapositive */
.pe-hero-item .pe-hero-text > * { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.pe-hero-item.is-active .pe-hero-text > * { opacity: 1; transform: none; }
.pe-hero-item.is-active .pe-hero-text > :nth-child(1) { transition-delay: calc(var(--hero-fade, 1000ms) * .35); }
.pe-hero-item.is-active .pe-hero-text > :nth-child(2) { transition-delay: calc(var(--hero-fade, 1000ms) * .45); }
.pe-hero-item.is-active .pe-hero-text > :nth-child(3) { transition-delay: calc(var(--hero-fade, 1000ms) * .55); }
.pe-hero-item.is-active .pe-hero-text > :nth-child(4) { transition-delay: calc(var(--hero-fade, 1000ms) * .65); }
.pe-hero-dots { position: absolute; left: 0; right: 0; bottom: 3.1rem; display: flex; justify-content: center; gap: .4rem; z-index: 3; }
.pe-hero-dots button { border: 0; background: none; padding: 6px 2px; cursor: pointer; }
.pe-hero-dots span { display: block; width: 26px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.45); position: relative; overflow: hidden; }
.pe-hero-dots .is-active span { background: rgba(255,255,255,.35); }
.pe-hero-dots .is-active span::after { content: ''; position: absolute; inset: 0; background: var(--pe-amber, #E9A23B); transform-origin: left; animation: pe-hero-progress var(--dot-time, 7000ms) linear forwards; }
.pe-hero.is-paused .pe-hero-dots .is-active span::after { animation-play-state: paused; }
@keyframes pe-hero-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pe-hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(10,16,32,.35); color: #fff; font-size: 1.2rem; opacity: 0; transition: opacity .25s; }
.pe-hero:hover .pe-hero-nav, .pe-hero-nav:focus-visible { opacity: 1; }
.pe-hero-prev { left: 14px; }
.pe-hero-next { right: 14px; }
@media (max-width: 767.98px) {
    .pe-hero { height: 360px; border-radius: 16px; }
    .pe-hero-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pe-hero-item, .pe-hero-media, .pe-hero-item .pe-hero-text > * { transition: none !important; transform: none !important; }
}
/* Lecture d'une vidéo en grand */
.pe-video-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5,10,20,.88); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.pe-video-lightbox-box { width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.pe-video-lightbox-box iframe, .pe-video-lightbox-box video { width: 100%; height: 100%; border: 0; display: block; }
.pe-video-lightbox-close { position: absolute; top: 14px; right: 18px; font-size: 2rem; color: #fff; background: none; border: 0; line-height: 1; }
.pe-hero-slide { padding-bottom: 5.4rem; }
.pe-hero-slide.pe-align-center .pe-hero-text { max-width: 860px; margin: 0 auto; }
@media (max-width: 767.98px) { .pe-hero-slide { padding-bottom: 4.6rem; } .pe-hero-actions .btn-lg { padding: .45rem .9rem; font-size: 1rem; } }

/* Fil d'actualité : colonnes latérales qui accompagnent le défilement, défilement infini, zone de publication */
.pe-feed-grid > aside, .pe-feed-grid > .pe-feed-livewire > aside { align-self: stretch; }
.pe-sticky { transition: none; }
.pe-infinite { min-height: 44px; }
.pe-infinite-loader { display: none; color: var(--pe-muted); font-size: .85rem; }
.pe-js .pe-infinite-btn { display: none; }
.pe-js .pe-infinite-loader { display: inline-flex; align-items: center; gap: .4rem; }
.pe-feed-end { padding: 1rem 0 2rem; }
.pe-composer .pe-card-body { padding: 1rem 1.1rem; }
.pe-composer-fake { display: block; border: 1px solid var(--pe-line); background: #F3F5F9; border-radius: 999px; padding: .7rem 1.1rem; color: var(--pe-muted); text-decoration: none; cursor: text; transition: background .15s; }
.pe-composer-fake:hover { background: #E9EDF4; color: var(--pe-muted); }
.pe-composer-avatar { width: 44px; height: 44px; border-radius: 50%; background: #E9EDF4; display: inline-flex; align-items: center; justify-content: center; color: var(--pe-muted); font-size: 1.2rem; flex: none; }
.pe-composer-text { resize: vertical; min-height: 96px; border-radius: 12px; }
.pe-composer-preview { position: relative; display: inline-block; }
.pe-composer-preview img { max-height: 220px; max-width: 100%; border-radius: 10px; display: block; }
.pe-composer-preview .btn { position: absolute; top: 6px; right: 6px; border-radius: 50%; }
.pe-composer-shortcuts { display: flex; flex-wrap: wrap; border-top: 1px solid var(--pe-line); padding: .35rem .6rem; gap: .1rem; }
.pe-composer-shortcuts a { flex: 1 1 auto; text-align: center; font-size: .82rem; font-weight: 600; color: #4B5563; text-decoration: none; padding: .45rem .5rem; border-radius: 8px; white-space: nowrap; }
.pe-composer-shortcuts a:hover { background: #F3F5F9; color: var(--pe-ink); }
.pe-composer-form { display: none; }
.pe-composer.is-open .pe-composer-form { display: block; }
.pe-composer.is-open .pe-composer-closed { display: none !important; }

/* En-tête de profil : nom et actions principales sur la même ligne, sous la couverture */
.pe-identity { align-items: flex-start; }
.pe-identity-main { flex: 1; min-width: 0; padding-top: 68px; }
.pe-identity-row { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }
.pe-identity-row h1 { flex: 1 1 260px; min-width: 0; font-size: 1.8rem; margin: 0; }
.pe-identity-row .pe-identity-actions { padding-top: 0; margin-left: auto; display: flex; align-items: center; gap: .45rem; flex-wrap: nowrap; }
.pe-identity-row .pe-identity-actions form { margin: 0; }
@media (max-width: 767.98px) {
    .pe-identity-main { padding-top: 0; flex-basis: 100%; }
    .pe-identity-row .pe-identity-actions { margin-left: 0; flex-wrap: wrap; }
}
/* Mobile : actions du profil sur une seule ligne, boutons compacts */
@media (max-width: 767.98px) {
    .pe-identity-row .pe-identity-actions { flex-wrap: nowrap; width: 100%; }
    .pe-identity-row .pe-identity-actions .btn { padding: .35rem .6rem; font-size: .88rem; white-space: nowrap; }
}

/* Accueil sur mobile : chaque section devient une rangée qui défile horizontalement (glisser), une seule ligne */
@media (max-width: 767.98px) {
    .pe-home-section .pe-poster-grid,
    .pe-home-section .pe-tv-grid,
    .pe-home-section .pe-creator-grid,
    .pe-home-section .pe-rail,
    .pe-home-section > .row,
    .pe-home-section .pe-home-scroll {
        display: flex !important; flex-wrap: nowrap !important; gap: .75rem; overflow-x: auto; overflow-y: hidden;
        scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
        margin-left: -12px; margin-right: -12px; padding: 4px 12px 10px; scroll-padding-left: 12px;
    }
    .pe-home-section .pe-poster-grid::-webkit-scrollbar, .pe-home-section .pe-tv-grid::-webkit-scrollbar,
    .pe-home-section .pe-creator-grid::-webkit-scrollbar, .pe-home-section .pe-rail::-webkit-scrollbar,
    .pe-home-section > .row::-webkit-scrollbar { display: none; }
    .pe-home-section .pe-poster-grid > *, .pe-home-section .pe-rail > * { flex: 0 0 72%; max-width: 72%; min-width: 0; scroll-snap-align: start; }
    .pe-home-section .pe-tv-grid > * { flex: 0 0 80%; max-width: 80%; min-width: 0; scroll-snap-align: start; }
    .pe-home-section .pe-creator-grid > * { flex: 0 0 44%; max-width: 44%; min-width: 0; scroll-snap-align: start; }
    .pe-home-section > .row > [class*="col"] { flex: 0 0 82%; max-width: 82%; width: auto; padding: 0; margin: 0; scroll-snap-align: start; }
    .pe-home-section .pe-poster { height: 300px; }
}
/* En-têtes de section compacts sur mobile : titre à gauche, « Tout voir » à droite sur la même ligne */
@media (max-width: 767.98px) {
    .pe-home-section { padding-top: 1.4rem; }
    .pe-home-head { flex-wrap: nowrap !important; align-items: center !important; gap: .6rem; margin-bottom: .6rem; }
    .pe-home-head > div:first-child { min-width: 0; gap: .6rem !important; }
    .pe-home-head h2 { font-size: 1.2rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pe-home-head p { display: none; }
    .pe-home-head-icon { width: 34px !important; height: 34px !important; font-size: 1rem !important; flex: none; }
    .pe-home-head .btn { flex: none; white-space: nowrap; }
}

/* Menu du bas (mobile et tablette, comme une application) */
.pe-bottom-nav { display: none; }
@media (max-width: 991.98px) {
    .pe-bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        background: rgba(255,255,255,.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        border-top: 1px solid var(--pe-line); box-shadow: 0 -4px 18px rgba(20,33,61,.08);
        padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
    }
    .pe-bottom-nav a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
        color: #6B7280; text-decoration: none; font-size: .68rem; font-weight: 600; padding: .25rem 0; line-height: 1.1; }
    .pe-bottom-nav a i { font-size: 1.3rem; line-height: 1; }
    .pe-bottom-nav a > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .pe-bottom-nav a.active { color: var(--pe-ink, #14213D); }
    .pe-bottom-nav .pe-avatar, .pe-bottom-nav .pe-logo { width: 24px !important; height: 24px !important; font-size: .6rem !important; }
    .pe-bottom-nav a.active .pe-avatar { box-shadow: 0 0 0 2px var(--pe-ink, #14213D); }
    .pe-bottom-nav-plus { width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: var(--pe-amber, #E9A23B); color: #14213D;
        display: inline-flex !important; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(233,162,59,.45); border: 3px solid #fff; overflow: visible !important; }
    .pe-bottom-nav-plus i { font-size: 1.35rem !important; }
    .pe-bottom-nav-badge { position: absolute; top: -4px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #DC3545; color: #fff;
        font-size: .62rem; line-height: 17px; text-align: center; overflow: visible !important; }
    /* la page ne doit pas passer sous le menu */
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .pe-chat { height: calc(100vh - 170px - 64px); }
}
@media print { .pe-bottom-nav { display: none !important; } body { padding-bottom: 0 !important; } }
