/* Compléments au thème d'origine (style.css) : polices hébergées, accessibilité, et quelques composants fonctionnels
   (avis, galerie, onglets, listes d'espace membre). Le style général reste celui du thème. */

/* Polices hébergées : aucune requête vers Google, affichage immédiat avec la police de secours */
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/titillium-web-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/titillium-web-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/titillium-web-latin-700-normal.woff2") format("woff2"); }
body, button, input, select, textarea, li, td, th, span, small, label, summary { font-family: "Titillium Web", sans-serif; }

:root { --mint: #00d7b3; --ink: #2b373a; --muted: #6b7a80; --danger: #b3261e; --line: #ebebeb; }

/* ---------- Accessibilité ---------- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100000; background: var(--ink); color: #fff; padding: 10px 16px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #1bc3ff; outline-offset: 2px; }
#main:focus { outline: none; }
.mfp-hide { display: none !important; }
[hidden] { display: none !important; }
.form-error { color: var(--danger); font-weight: 600; }
.form-ok { color: #0a7a5f; font-weight: 600; }

/* ---------- Barre d'information et notifications ---------- */
.notice-bar { background: #fff4d6; color: #5a4300; padding: 10px 16px; text-align: center; font-size: 14px; border-bottom: 1px solid #e8d8a2; }
.notice-bar button { margin-left: 10px; background: var(--ink); color: #fff; border: 0; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.toast-zone { position: fixed; right: 16px; bottom: 16px; z-index: 100001; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); border-left: 4px solid var(--mint); }
.toast.error { border-left-color: #e61852; }

/* ---------- Cartes produit : on garde les cartes du thème ---------- */
.product-list .product-item .product-preview-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-list .product-item .price .old { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: .6em; margin-left: 6px; white-space: nowrap; }
.product-list .product-item .rating-item.empty svg { fill: #d9dfe0; }
.skeleton { background: linear-gradient(90deg, #e6ebec 25%, #f3f6f6 37%, #e6ebec 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; min-height: 300px; margin-bottom: 20px; width: 278px; max-width: 100%; float: left; margin-right: 20px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); clear: both; }
.empty-state strong { display: block; color: var(--ink); font-size: 1.2em; margin-bottom: 6px; }
.stars { display: inline-flex; align-items: center; gap: 2px; color: #f5a623; }
.stars .off { color: #cfd6d8; }
.stars small { color: var(--muted); margin-left: 4px; }

/* ---------- Catalogue ---------- */
.filters-toggle { display: none; width: 100%; margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { background: var(--ink); color: #fff; border: 0; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.filter-grid { display: grid; gap: 10px; }
.filter-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-grid label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.filter-grid input[type=number], .filter-grid input[type=search], .filter-grid select { width: 100%; }
@media (max-width: 935px) {
  .filters-toggle { display: block; }
  #catalog-filters { display: none; float: none; width: 100%; }
  #catalog-filters.open { display: block; }
}

/* ---------- Fiche produit ---------- */
.gallery .main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #dde4e6; display: block; }
.gallery .thumbs { display: flex; gap: 8px; margin: 10px 0 24px; flex-wrap: wrap; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; overflow: hidden; width: 84px; height: 56px; cursor: pointer; background: none; }
.gallery .thumbs button[aria-current=true] { border-color: var(--mint); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-price { font-size: 2em; font-weight: 700; color: var(--ink); }
.pd-price .price-old { font-size: .5em; margin-left: 8px; color: var(--muted); text-decoration: line-through; font-weight: 400; }
.pd-price .pin { position: static; margin-left: 10px; font-size: 14px; vertical-align: middle; }
.pd-title { color: var(--ink); font-size: 1.6em; margin: 0 0 12px; }
.pd-sub { margin: 24px 0 8px; color: var(--ink); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 0 0 18px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 16px; font-weight: 700; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--mint); }
.prose { white-space: pre-wrap; line-height: 1.7; color: #444; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.review small { color: var(--muted); }
.rating-pick { display: inline-flex; gap: 4px; }
.rating-pick button { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #cfd6d8; padding: 0 2px; }
.rating-pick button.on { color: #f5a623; }
.owned-note { background: #e6fbf6; border: 1px solid #9fe9d8; color: #0a5c4a; padding: 10px 14px; font-size: 14px; }

/* ---------- Formulaires et espace membre ---------- */
.app-form { display: grid; gap: 14px; max-width: 760px; }
.app-form .input-container { margin: 0; }
.app-form textarea { min-height: 140px; }
.app-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .app-form .row2 { grid-template-columns: 1fr; } }
.app-form small { color: var(--muted); display: block; margin-top: 4px; }
.app-form label.check { display: flex; gap: 8px; align-items: center; }
.link, a.link { color: #00a88c; font-weight: 700; }
.link:hover { text-decoration: underline; }
.list-row { display: flex; gap: 12px; padding: 12px 4px; align-items: center; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-row.head { font-weight: 700; }
.list-row > * { flex: 1 1 90px; min-width: 0; overflow-wrap: anywhere; }
.list-row > .wide { flex: 3 1 200px; }
.list-row > .actions { flex: 2 1 200px; }
.list-row .button, .file-list li .button { width: auto; flex: none; display: inline-block; }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #e3e9ea; color: var(--ink); }
.status.published, .status.paid { background: #d7f7ee; color: #0a5c4a; }
.status.pending { background: #fff1c9; color: #6b4e00; }
.status.rejected, .status.refunded, .status.disputed { background: #ffe0e0; color: #8a1c1c; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.img-grid figure { position: relative; margin: 0; }
.img-grid img { width: 120px; height: 80px; object-fit: cover; display: block; }
.img-grid button { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .7); color: #fff; border: 0; cursor: pointer; padding: 2px 8px; }
.progress { height: 8px; background: #e3e9ea; overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--mint); width: 0; transition: width .2s; }
.danger-zone { border: 1px solid #f0b4b4; background: #fff5f5; padding: 18px; }
.danger-zone h3 { color: var(--danger); margin-top: 0; }
.button.danger { background: var(--danger); color: #fff !important; }

/* ---------- Page d'état (404) ---------- */
.state-page { text-align: center; max-width: 560px; margin: 64px auto; padding: 0 16px; }
.state-page .code { font-size: 5em; font-weight: 700; color: var(--mint); line-height: 1; }

/* Cartes au format Minestia-like : titre sur 2 lignes, catégorie et prix sur une ligne, vendeur et vues */
.product-list .product-item .product-info .text-header { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; height: 2.5em; line-height: 1.25em; margin-bottom: 8px; }
.product-list .product-item .cat-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-list .product-item .cat-price .category { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.product-list .product-item .cat-price .price { white-space: nowrap; margin: 0; float: none; }
.product-list .product-item .price.free { color: var(--ink); }
.product-list .product-item .user-rating { display: flex; align-items: center; gap: 8px; }
.product-list .product-item .user-rating .text-header { max-width: 110px; height: auto; display: inline-block; -webkit-line-clamp: unset; margin: 0; }
.product-list .product-item .user-rating .views { margin-left: auto; font-size: .8125em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.product-list .product-item .user-rating .user-avatar { float: none; }
.product-list .product-item.featured { border-color: #f5a623; }
.product-list .product-item .featured-badge { position: absolute; top: 5px; left: 5px; z-index: 9991; background: #f5a623; color: #fff; font-size: .625em; font-weight: 700; text-transform: uppercase; padding: 2px 6px; }

/* Menu « Ressources » */
.content-dropdown.mega { display: flex; gap: 24px; padding: 24px; width: 940px; max-width: 96vw; }
.content-dropdown.mega .mega-cols { flex: 1; columns: 3 190px; column-gap: 24px; }
.content-dropdown.mega .mega-col { break-inside: avoid; margin-bottom: 18px; }
.content-dropdown.mega .mega-title { display: block; font-weight: 700; text-transform: uppercase; font-size: .8125em; color: var(--ink); margin-bottom: 8px; }
.content-dropdown.mega .mega-link { display: block; font-size: .8125em; color: var(--muted); padding: 3px 0; line-height: 1.3; }
.content-dropdown.mega .mega-link:hover, .content-dropdown.mega .mega-title:hover { color: #00a88c; }
.content-dropdown.mega .mega-featured { width: 250px; position: relative; border: 1px solid #f5a623; padding: 6px; background: #fff; align-self: flex-start; }
.content-dropdown.mega .mega-featured img { width: 100%; height: 130px; object-fit: cover; display: block; }
.content-dropdown.mega .mega-badge { position: absolute; top: 6px; left: 6px; background: #f5a623; color: #fff; font-size: .625em; font-weight: 700; text-transform: uppercase; padding: 2px 6px; }
.content-dropdown.mega .mega-ftitle { display: block; font-weight: 700; margin: 8px 0 4px; color: var(--ink); }
.content-dropdown.mega .mega-frow { display: flex; justify-content: space-between; font-size: .8125em; }
.content-dropdown.mega .mega-fcat { color: #1bc3ff; font-weight: 700; }

/* ---------- Fiche produit (disposition à deux colonnes) ---------- */
.pd-buybox { background: var(--ink); color: #fff; padding: 18px 20px; margin-bottom: 20px; }
.pd-buyrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pd-buybox .pd-price { color: #fff; font-size: 1.75em; font-weight: 700; }
.pd-buy { color: var(--mint); font-weight: 700; font-size: 1.25em; }
.pd-buy:hover { color: #fff; }
.pd-buy.disabled { color: #8a979b; cursor: not-allowed; }
.pd-waiver { display: block; margin-top: 12px; font-size: .75em; color: #b8c3c6; line-height: 1.4; }
.pd-waiver a { color: var(--mint); }
.pd-panel { background: #fff; border: 1px solid var(--line); padding: 14px 18px 24px; }
.pd-panel .gallery .main { aspect-ratio: auto; max-height: 460px; object-fit: contain; background: #f3f6f6; }
.video-wrap { position: relative; padding-bottom: 56.25%; height: 0; background: #000; margin-bottom: 20px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pd-panel .tabs { margin-top: 30px; }
.sidebar-item .pd-seller { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sidebar-item .pd-seller .user-avatar { float: none; margin: 0; flex: none; }
.sidebar-item .pd-seller .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-item .pd-seller .text-header { display: inline; }
.sidebar-item.author-bio .button { display: block; margin-top: 12px; text-align: center; }
.pd-others { list-style: none; margin: 0; padding: 0; }
.pd-others li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.pd-others li:last-child { border-bottom: 0; }
.pd-others img { width: 64px; height: 44px; object-fit: cover; display: block; flex: none; }
.pd-others .pd-other-title { display: block; font-weight: 700; color: var(--ink); line-height: 1.2; }
.pd-others .pd-other-cat { display: block; font-size: .75em; color: #00a88c; font-weight: 700; }
.pd-others strong { font-size: 1.1em; color: var(--ink); }

/* ---------- Espace membre : barre supérieure et menu latéral ---------- */
.dashboard-header .db-stat, .dashboard-header .db-discord { display: flex; flex-direction: column; justify-content: center; padding: 0 22px; border-left: 1px solid var(--line); min-width: 150px; line-height: 1.2; }
.dashboard-header .db-stat strong { font-size: 1.1em; color: var(--ink); }
.dashboard-header .db-stat span, .dashboard-header .db-discord a { font-size: .75em; color: var(--muted); }
.dashboard-header .db-discord strong { font-size: .8125em; color: var(--ink); text-transform: uppercase; }
.dashboard-header .db-discord a:hover { color: #00a88c; }
.dashboard-header .back-button .button { font-size: 1.4em; padding: 0 18px; }
@media (max-width: 1100px) { .dashboard-header .db-stat, .dashboard-header .db-discord { display: none; } }

/* ---------- Espace membre : colonnes, zones de dépôt, grille des produits, tableaux ---------- */
.db-two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.db-two .db-main .form-box-item, .db-two .db-side .form-box-item { width: auto; float: none; }
@media (max-width: 1100px) { .db-two { grid-template-columns: 1fr; } }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 2px dashed #cfd6d8; background: repeating-linear-gradient(45deg, #f7f9f9, #f7f9f9 10px, #fff 10px, #fff 20px); color: var(--muted); text-align: center; cursor: pointer; padding: 14px; position: relative; font-size: .8125em; }
.dropzone:hover, .dropzone.over, .dropzone:focus-within { border-color: var(--mint); color: var(--ink); }
.dropzone img { max-height: 110px; max-width: 100%; object-fit: contain; }
.dropzone .dz-icon { font-size: 2em; line-height: 1; color: #b8c3c6; }
.radio-row { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.guide-item { font-size: .875em; margin-bottom: 12px; line-height: 1.5; }
.guide-item strong { color: var(--ink); }
.post-btn { width: 100%; font-size: 1.125em; }
.post-btn .primary { color: var(--mint); }
.db-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.db-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 260px; border: 2px dashed #cfd6d8; color: var(--muted); text-align: center; background: transparent; }
.db-add:hover { border-color: var(--mint); color: var(--ink); }
.db-add .db-plus { display: flex; align-items: center; justify-content: center; width: 90px; height: 70px; background: #e3e9ea; font-size: 3em; color: #fff; }
.db-card { background: #fff; border: 1px solid var(--line); }
.db-card-img { position: relative; aspect-ratio: 16 / 9; background: #dde4e6; overflow: hidden; }
.db-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.db-gear { position: absolute; top: 8px; right: 8px; background: rgba(43, 55, 58, .85); color: #fff; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 1.1em; }
.db-card-body { padding: 12px 14px 14px; }
.db-card-title { display: block; font-weight: 700; color: var(--ink); line-height: 1.25; min-height: 2.5em; margin-bottom: 6px; }
.db-card .cat-price { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.db-meta { color: var(--muted); font-size: .75em; margin-bottom: 8px; }
.db-table { background: #fff; }
.db-tr { display: grid; grid-template-columns: 1.1fr 3fr .8fr 1.4fr 1.1fr; gap: 14px; padding: 14px 12px; align-items: center; border-bottom: 1px solid var(--line); font-size: .875em; }
.db-th { font-weight: 700; color: var(--ink); font-size: .9em; }
.db-table:not(.db-purchases) .db-tr { grid-template-columns: 1fr 2.4fr 1fr 1fr 1fr 1fr; }
.db-prod { display: flex; align-items: center; gap: 12px; }
.db-prod img { width: 72px; height: 48px; object-fit: cover; flex: none; }
.db-prod a { font-weight: 700; }
@media (max-width: 800px) { .db-tr, .db-table:not(.db-purchases) .db-tr { grid-template-columns: 1fr 1fr; } }

/* ---------- Comment acheter ? ---------- */
.how .how-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 340px; }
.how .how-row.rev .how-visual { order: 2; }
.how .how-visual { display: flex; align-items: center; justify-content: center; color: #fff; position: relative; overflow: hidden; }
.how .how-visual span { font-size: 7em; opacity: .95; }
.how .how-visual b { position: absolute; right: 24px; bottom: 6px; font-size: 9em; line-height: 1; opacity: .12; }
.how .how-text { display: flex; flex-direction: column; justify-content: center; padding: 40px 8%; background: #f5f5f5; }
.how .how-row:nth-child(even) .how-text { background: #fff; }
.how .how-text h2 { color: var(--ink); font-size: 1.75em; margin-bottom: 14px; }
.how .how-text p { color: var(--muted); line-height: 1.7; margin-bottom: 22px; max-width: 520px; }
.how .how-text .button { align-self: flex-start; }
@media (max-width: 800px) { .how .how-row { grid-template-columns: 1fr; } .how .how-row.rev .how-visual { order: 0; } .how .how-visual { min-height: 180px; } }

/* ---------- Profil vendeur ---------- */
.author-profile-banner.has-image { background-size: cover; background-position: center; }
.sl-links { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sl-links a { color: #00a88c; font-weight: 700; font-size: .875em; }
.section-headline p a { color: #fff; }

/* ---------- Texte riche (descriptions, articles) ---------- */
.prose-rich { line-height: 1.7; color: #444; overflow-wrap: anywhere; }
.prose-rich > * + * { margin-top: .8em; }
.prose-rich h2 { font-size: 1.4em; color: var(--ink); margin-top: 1.2em; }
.prose-rich h3 { font-size: 1.2em; color: var(--ink); margin-top: 1em; }
.prose-rich h4 { font-size: 1.05em; color: var(--ink); }
.prose-rich ul, .prose-rich ol { padding-left: 1.4em; }
.prose-rich ul { list-style: disc; }
.prose-rich ol { list-style: decimal; }
.prose-rich blockquote { border-left: 4px solid var(--mint); padding: 6px 14px; background: #f5f8f8; color: var(--ink); }
.prose-rich pre { background: var(--ink); color: #e9f2f2; padding: 12px 14px; overflow-x: auto; font-family: Consolas, monospace; font-size: .875em; white-space: pre-wrap; }
.prose-rich code { font-family: Consolas, monospace; background: #eef3f3; padding: 1px 4px; }
.prose-rich pre code { background: none; padding: 0; }
.prose-rich a { color: #00a88c; text-decoration: underline; }
.prose-rich img { max-width: 100%; height: auto; display: block; margin: 12px 0; }
.prose-rich hr { border: 0; border-top: 1px solid var(--line); }
.prose-rich strong, .prose-rich b { font-weight: 700; color: var(--ink); }
.rich-editor { border: 1px solid #ebebeb; background: #fff; }
.re-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid #ebebeb; background: #f7f9f9; }
.re-toolbar button, .re-toolbar .re-img { border: 0; background: none; padding: 5px 9px; font-size: 13px; cursor: pointer; color: var(--ink); min-width: 30px; }
.re-toolbar button:hover, .re-toolbar .re-img:hover { background: #e3e9ea; }
.re-toolbar .re-img.busy { opacity: .5; pointer-events: none; }
.re-sep { width: 1px; background: #d9dfe0; margin: 4px 4px; }
.re-area { min-height: 220px; max-height: 560px; overflow-y: auto; padding: 12px 14px; outline: none; }
.re-area:focus { box-shadow: inset 0 0 0 2px #1bc3ff; }
.re-area.empty::before { content: attr(data-placeholder); color: #a5b0b3; pointer-events: none; }
.re-count { text-align: right; font-size: 12px; color: var(--muted); padding: 2px 8px 6px; }
.re-count.over { color: var(--danger); font-weight: 700; }

/* ---------- Premium ---------- */
.premium-badge { display: inline-block; background: #e61852; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }
.premium-line { margin-bottom: 10px; }
.premium-line .premium-badge { margin-left: 0; }
.premium-perks { list-style: none; padding: 0; margin: 8px 0 14px; }
.premium-perks li { padding-left: 22px; position: relative; margin-bottom: 6px; font-size: .875em; }
.premium-perks li::before { content: "\2713"; position: absolute; left: 0; color: #00a88c; font-weight: 700; }

/* ---------- Blog (tutoriels) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); color: inherit; transition: box-shadow .15s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }
.post-card figure { aspect-ratio: 16 / 9; overflow: hidden; background: #dde4e6; margin: 0; }
.post-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .post-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .post-date { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.post-card h2 { font-size: 1.2em; color: var(--ink); line-height: 1.3; }
.post-card p { color: var(--muted); font-size: .875em; line-height: 1.6; }
.post-card .post-more { margin-top: auto; color: #00a88c; font-weight: 700; font-size: .875em; }
.article .article-cover { margin: 0 0 16px; }
.article .article-cover img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.article .article-meta { color: var(--muted); font-size: .8125em; margin-bottom: 16px; }

/* ---------- Chat en direct ---------- */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 99990; display: flex; align-items: center; gap: 8px; background: var(--mint); color: #fff; border: 0; border-radius: 30px; padding: 14px 20px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.chat-fab:hover { background: #00c2a1; }
.chat-badge { background: #e61852; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.chat-panel { position: fixed; right: 20px; bottom: 84px; z-index: 99991; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px); background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.chat-head { background: var(--ink); color: #fff; padding: 14px 44px 14px 16px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.chat-head strong { font-size: 15px; }
.chat-head span { font-size: 12px; opacity: .8; }
.chat-close { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; padding: 4px 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; background: #f5f7f7; display: flex; flex-direction: column; gap: 8px; }
.chat-intro, .chat-error { font-size: 13px; color: var(--muted); }
.chat-error { color: var(--danger); }
.chat-msg { max-width: 85%; padding: 8px 12px; font-size: 13px; line-height: 1.45; background: #fff; border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.chat-msg.visitor { align-self: flex-end; background: #d7f7ee; border-color: #b6eddc; }
.chat-msg.system { background: #fff8e1; border-color: #f1e2b2; }
.chat-msg p { white-space: pre-wrap; margin: 0; }
.chat-who { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.chat-foot { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-foot.start { flex-direction: column; align-items: stretch; }
.chat-foot input, .chat-foot textarea { width: 100%; border: 1px solid #dfe5e6; padding: 8px; font-size: 13px; resize: none; }
.chat-send { background: var(--ink); color: #fff; border: 0; padding: 9px 14px; font-weight: 700; cursor: pointer; flex: none; }
.chat-send:disabled { opacity: .6; }
@media (max-width: 600px) { .chat-fab .chat-fab-label { display: none; } .chat-fab { padding: 14px; } .chat-panel { right: 8px; left: 8px; width: auto; bottom: 78px; } }

/* Chat côté administration */
.admin-chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-chat .form-box-item { width: auto; float: none; margin: 0; }
.admin-chat-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 6px; cursor: pointer; }
.admin-chat-item:hover, .admin-chat-item.active { background: #f0f6f5; }
.admin-chat-item.closed { opacity: .6; }
.aci-top { display: flex; justify-content: space-between; align-items: center; }
.aci-badge { background: #e61852; color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; }
.aci-last { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0; }
.aci-date { font-size: 11px; color: #9aa6a9; }
.act-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.act-log { height: 420px; overflow-y: auto; background: #f5f7f7; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.act-log .chat-msg.visitor { align-self: flex-start; background: #fff; border-color: var(--line); }
.act-log .chat-msg.admin { align-self: flex-end; background: #d7f7ee; border-color: #b6eddc; }
.act-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.act-form textarea { flex: 1; resize: vertical; }
@media (max-width: 1000px) { .admin-chat { grid-template-columns: 1fr; } }
