/* Resources pages: simple, lisible, cohérent avec le style existant */

/* ===== Listing (resources.php) ===== */

.resources-main .page-hero {
  text-align: center;
  margin-bottom: 18px;
}

.resources-intro {
  max-width: 760px;
  margin: 10px auto 0;
  opacity: .95;
  line-height: 1.45;
}

.resources-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 18px 0 26px;
}

.filter-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.35);
  text-decoration: none;
  color: var(--text, #EDDFCF);
  background: rgba(20,45,58,0.25);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}

.filter-pill:hover {
  transform: translateY(-1px);
  background: rgba(20,45,58,0.35);
  border-color: rgba(237,223,207,0.55);
}

.filter-pill.is-active {
  background: rgba(237,223,207,0.12);
  border-color: rgba(237,223,207,0.65);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.resource-card {
  padding: 16px 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(237,223,207,0.18);
  background: rgba(20,45,58,0.20);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: rgba(237,223,207,0.35);
  background: rgba(20,45,58,0.24);
}

.resource-card.has-thumb {
  padding: 12px 12px 14px;
}

.resource-card-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
  margin-bottom: 10px;
  transition: transform .15s ease, box-shadow .2s ease;
}

/* vignette plus haute (comme demandé) */
.resource-card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.resource-card:hover .resource-card-thumb {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.22);
}

.resource-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  opacity: .95;
}

.resource-tag {
  display: inline-block;
  font-size: .82rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.25);
  background: rgba(0,0,0,0.12);
}

.resource-minutes {
  font-size: .82rem;
  opacity: .9;
}

.resource-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.resource-title a {
  color: var(--text, #EDDFCF);
  text-decoration: none;
}

.resource-title a:hover {
  text-decoration: underline;
}

.resource-excerpt {
  margin: 0 0 12px;
  opacity: .95;
  line-height: 1.35;
}

.resource-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  opacity: .95;
}

.resource-updated {
  font-size: .82rem;
  opacity: .85;
}

.resource-open {
  text-decoration: none;
  font-weight: 600;
  color: var(--text, #EDDFCF);
}

.resource-open:hover {
  text-decoration: underline;
}

.resources-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 10px;
  border: 1px dashed rgba(237,223,207,0.25);
  text-align: center;
  opacity: .95;
}

/* ===== Resource page (resource.php) ===== */

.resources-container.resource-page {
  max-width: 1080px;
  margin: 0 auto;
}

.resource-back {
  margin: 6px 0 10px;
  opacity: .9;
}

.resource-back a {
  color: var(--text, #EDDFCF);
  text-decoration: none;
}

.resource-back a:hover {
  text-decoration: underline;
}

.resource-page-title {
  margin: 0 0 6px;
  text-align: center;
}

.resource-page-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  opacity: .9;
  font-size: .95rem;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.resource-top {
  margin-top: 10px;
}

.resource-top-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 16px;
  align-items: stretch;
}

.resource-topcard {
  border-radius: 12px;
  border: 1px solid rgba(237,223,207,0.18);
  background: rgba(20,45,58,0.20);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  padding: 14px 14px 12px;
  height: 100%;
}

.resource-box-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.resource-toc {
  margin: 0 0 12px;
  padding-left: 18px;
  line-height: 1.35;
}

.resource-toc ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.resource-toc a {
  color: var(--text, #EDDFCF);
  text-decoration: none;
}

.resource-toc a:hover {
  text-decoration: underline;
}

.resource-direct p {
  margin: 6px 0 0;
  opacity: .97;
  line-height: 1.45;
}

/* Right card = media */
.resource-topcard--media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.resource-cover {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
  cursor: pointer;
  flex: 1;
}

.resource-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.resource-cover--empty {
  min-height: 220px;
}

.resource-viewbtn {
  display: inline-block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(237,223,207,0.28);
  background: rgba(0,0,0,0.14);
  color: var(--text, #EDDFCF);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.resource-viewbtn:hover {
  background: rgba(0,0,0,0.20);
  border-color: rgba(237,223,207,0.40);
}

/* Article sections */
.resource-article {
  margin-top: 18px;
}

.resource-section {
  margin: 16px 0;
}

.resource-section h2 {
  margin: 0 0 8px;
}

.resource-section p {
  margin: 0 0 10px;
  line-height: 1.55;
  opacity: .97;
  text-align: justify;
  hyphens: auto;
}

.resource-bullets {
  margin: 8px 0 0;
  padding-left: 20px; /* aligne mieux */
}

.resource-bullets li {
  margin: 4px 0;
}

/* Space before FAQ */
.resource-faq {
  margin-top: 22px;
  padding-top: 10px;
}

.resource-faq h2 {
  margin: 0 0 10px;
}

/* FAQ: preview + Expand (no duplicated answer) */
.resource-faq-item {
  border: 1px solid rgba(237,223,207,0.18);
  border-radius: 10px;
  background: rgba(20,45,58,0.14);
  margin: 10px 0;
  overflow: hidden;
}

  .resource-faq-item summary {
    cursor: default; /* évite l'effet "tout est un bouton" */
    padding: 10px 12px;
    padding-right: 120px; /* réserve la place du bouton à droite */
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: baseline;
    position: relative; /* ancre le bouton (absolute) */
  }

  .resource-faq-item summary::-webkit-details-marker { display: none; }

  .faq-q {
    font-weight: 700;
    white-space: nowrap;
  }

  .faq-preview {
    opacity: .9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }

  /* Bouton FAQ: aligné sur .btn-nav a (topbar), mais un cran plus petit */
  .faq-expand,
  .faq-retract {
    position: absolute;
    right: 12px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--text);
    color: var(--text);
    font-weight: 700;
    font-size: 0.54rem; /* 66% de 0.82rem */
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background .25s ease, color .25s ease, transform .2s ease;
  }
  .faq-expand:hover,
  .faq-retract:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
  }

  /* Par défaut: fermé -> on montre juste "Ouvrir" */
  .faq-retract { display: none; }
  .resource-faq-answer {
    padding: 0 12px 12px;
    opacity: .96;
    line-height: 1.5;
  }

  /* Ouvert: on cache preview + "Ouvrir", on montre "Refermer" */
  .resource-faq-item[open] .faq-preview,
  .resource-faq-item[open] .faq-expand {
    display: none;
  }

  .resource-faq-item[open] .faq-retract {
    display: inline-flex;
  }

/* ===== Lightbox (no JS) ===== */

.lb-open,
.lb-radio {
  position: absolute;
  left: -9999px;
}

.lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.lb-open:checked ~ .lb {
  display: block;
}

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
}

.lb-panel {
  position: relative;
  width: min(980px, calc(100% - 24px));
  height: min(86vh, 760px);
  margin: 6vh auto 0;
  border-radius: 14px;
  border: 1px solid rgba(237,223,207,0.20);
  background: rgba(10,18,22,0.92);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  overflow: hidden;
}

.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(237,223,207,0.12);
}

.lb-title {
  font-weight: 700;
  opacity: .95;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.20);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 20px;
  line-height: 1;
}

.lb-close:hover {
  background: rgba(255,255,255,0.08);
}

.lb-stage {
  position: relative;
  height: calc(100% - 58px);
}

.lb-slide {
  display: none;
  height: 100%;
  padding: 14px;
}

.lb-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* show active slide */
#lb-s1:checked ~ .lb .lb-slide-1 { display: block; }
#lb-s2:checked ~ .lb .lb-slide-2 { display: block; }
#lb-s3:checked ~ .lb .lb-slide-3 { display: block; }
#lb-s4:checked ~ .lb .lb-slide-4 { display: block; }
#lb-s5:checked ~ .lb .lb-slide-5 { display: block; }
#lb-s6:checked ~ .lb .lb-slide-6 { display: block; }
#lb-s7:checked ~ .lb .lb-slide-7 { display: block; }
#lb-s8:checked ~ .lb .lb-slide-8 { display: block; }
#lb-s9:checked ~ .lb .lb-slide-9 { display: block; }
#lb-s10:checked ~ .lb .lb-slide-10 { display: block; }
#lb-s11:checked ~ .lb .lb-slide-11 { display: block; }
#lb-s12:checked ~ .lb .lb-slide-12 { display: block; }
#lb-s13:checked ~ .lb .lb-slide-13 { display: block; }
#lb-s14:checked ~ .lb .lb-slide-14 { display: block; }
#lb-s15:checked ~ .lb .lb-slide-15 { display: block; }
#lb-s16:checked ~ .lb .lb-slide-16 { display: block; }
#lb-s17:checked ~ .lb .lb-slide-17 { display: block; }
#lb-s18:checked ~ .lb .lb-slide-18 { display: block; }
#lb-s19:checked ~ .lb .lb-slide-19 { display: block; }
#lb-s20:checked ~ .lb .lb-slide-20 { display: block; }

/* nav buttons per slide (shown only for the active one) */
.lb-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.20);
  background: rgba(0,0,0,0.25);
  color: var(--text, #EDDFCF);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}

.lb-nav:hover {
  background: rgba(0,0,0,0.35);
}

.lb-prev { left: 12px; }
.lb-next { right: 12px; }

#lb-s1:checked ~ .lb .lb-prev-1, #lb-s1:checked ~ .lb .lb-next-1 { display: grid; }
#lb-s2:checked ~ .lb .lb-prev-2, #lb-s2:checked ~ .lb .lb-next-2 { display: grid; }
#lb-s3:checked ~ .lb .lb-prev-3, #lb-s3:checked ~ .lb .lb-next-3 { display: grid; }
#lb-s4:checked ~ .lb .lb-prev-4, #lb-s4:checked ~ .lb .lb-next-4 { display: grid; }
#lb-s5:checked ~ .lb .lb-prev-5, #lb-s5:checked ~ .lb .lb-next-5 { display: grid; }
#lb-s6:checked ~ .lb .lb-prev-6, #lb-s6:checked ~ .lb .lb-next-6 { display: grid; }
#lb-s7:checked ~ .lb .lb-prev-7, #lb-s7:checked ~ .lb .lb-next-7 { display: grid; }
#lb-s8:checked ~ .lb .lb-prev-8, #lb-s8:checked ~ .lb .lb-next-8 { display: grid; }
#lb-s9:checked ~ .lb .lb-prev-9, #lb-s9:checked ~ .lb .lb-next-9 { display: grid; }
#lb-s10:checked ~ .lb .lb-prev-10, #lb-s10:checked ~ .lb .lb-next-10 { display: grid; }
#lb-s11:checked ~ .lb .lb-prev-11, #lb-s11:checked ~ .lb .lb-next-11 { display: grid; }
#lb-s12:checked ~ .lb .lb-prev-12, #lb-s12:checked ~ .lb .lb-next-12 { display: grid; }
#lb-s13:checked ~ .lb .lb-prev-13, #lb-s13:checked ~ .lb .lb-next-13 { display: grid; }
#lb-s14:checked ~ .lb .lb-prev-14, #lb-s14:checked ~ .lb .lb-next-14 { display: grid; }
#lb-s15:checked ~ .lb .lb-prev-15, #lb-s15:checked ~ .lb .lb-next-15 { display: grid; }
#lb-s16:checked ~ .lb .lb-prev-16, #lb-s16:checked ~ .lb .lb-next-16 { display: grid; }
#lb-s17:checked ~ .lb .lb-prev-17, #lb-s17:checked ~ .lb .lb-next-17 { display: grid; }
#lb-s18:checked ~ .lb .lb-prev-18, #lb-s18:checked ~ .lb .lb-next-18 { display: grid; }
#lb-s19:checked ~ .lb .lb-prev-19, #lb-s19:checked ~ .lb .lb-next-19 { display: grid; }
#lb-s20:checked ~ .lb .lb-prev-20, #lb-s20:checked ~ .lb .lb-next-20 { display: grid; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .resources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-top-grid { grid-template-columns: 1fr; }
  .lb-panel { height: min(86vh, 680px); }
}

@media (max-width: 640px) {
  .resources-grid { grid-template-columns: 1fr; }
  .resources-container { padding: 90px 14px 80px; }
  .faq-q { white-space: normal; }
  .faq-preview { white-space: normal; }
}


/* ===== Gallery modal (JS) ===== */
body.modal-open { overflow: hidden; }

.gallery-modal[hidden] { display: none !important; }

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
}

.gallery-dialog {
  position: relative;
  width: min(980px, calc(100% - 24px));
  height: min(86vh, 760px);
  margin: 6vh auto 0;
  border-radius: 14px;
  border: 1px solid rgba(237,223,207,0.20);
  background: rgba(10,18,22,0.92);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  overflow: hidden;
}

.gallery-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.20);
  background: transparent;
  color: var(--text, #EDDFCF);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.gallery-close:hover { background: rgba(255,255,255,0.08); }

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 14px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.20);
  background: rgba(0,0,0,0.30);
  color: var(--text, #EDDFCF);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 26px;
  line-height: 1;
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.gallery-nav:disabled {
  opacity: .35;
  cursor: default;
}

.gallery-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.gallery-footer span {
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(237,223,207,0.18);
  background: rgba(0,0,0,0.20);
}

/* =========================================================
   Resource page: layout tightening (baseline fix)
   ========================================================= */

/* centre et limite la largeur globale de la page ressource */
.resources-main .resources-container{
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 14px;
  padding-right: 14px;
}

/* grille du bloc haut: texte + cover */
.resource-top-grid{
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
}

/* colonne media: pas plus large que 520px */
.resource-topcard--media{
  max-width: 520px;
  justify-self: end;
}

/* cover: limite hauteur pour éviter l’effet “affiche 4x3 géante” */
.resource-cover{
  max-height: 560px;
}
.resource-cover img{
  max-height: 560px;
}

/* sur écrans moyens/petits: tout reprend une largeur normale */
@media (max-width: 980px){
  .resource-topcard--media{
    max-width: none;
    justify-self: stretch;
  }
  .resource-cover{
    max-height: 420px;
  }
  .resource-cover img{
    max-height: 420px;
  }
}

/* --- PATCH DEV: media plus étroite, image contenue et centrée --- */
.resource-top-grid{
  grid-template-columns: 1.85fr 1fr !important; /* droite ≈ 35% au lieu de 50% */
  align-items: start !important;
  gap: 22px !important;
}

.resource-topcard--media{
  justify-self: end !important;
}

.resource-cover{
  width: 100% !important;
  max-width: 520px !important;
  margin-left: auto !important;
  overflow: hidden !important;
  height: clamp(220px, 30vh, 320px) !important;
  aspect-ratio: 4 / 3 !important;
}

.resource-cover img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* pas de débordement */
  display: block !important;
}

/* Fix: H1 + meta inside LEFT card (avoid margin-collapsing / keep spacing consistent) */
.resource-top-grid > .resource-topcard:not(.resource-topcard--media){
  display: flow-root; /* creates a new block formatting context */
}

.resource-topcard .resource-page-title{
  margin: 0 0 .35rem 0 !important;
}

.resource-topcard .resource-page-meta{
  margin: 0 0 1rem 0 !important;
}


/* 1) Cap the overall content width so the two-column block doesn't feel too wide */
.resource-top-grid,
.resource-article,
.resource-faq{
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* 2) Desktop: keep right column from growing too much, left stays fluid */
@media (min-width: 981px){
  .resource-top-grid{
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  }
}

/* 3) Reading comfort: limit paragraph line length */
.resource-direct p,
.resource-section p{
  max-width: 75ch;
}

/* ==== FINAL OVERRIDE (2025-12-31): make Resource pages width/columns consistent & mobile-friendly ==== */
/* Reason: multiple conflicting .resource-top-grid rules exist (incl. !important). This block wins by being last + !important. */

.resource-top-grid,
.resource-article{
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Desktop/tablet wide: readable two columns (right media capped) */
.resource-top-grid{
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px) !important;
}

/* Ensure media column never stretches */
.resource-topcard--media,
.resource-cover{
  max-width: 460px !important;
}

/* Mobile: single column */
@media (max-width: 980px){
  .resource-top-grid{
    grid-template-columns: 1fr !important;
  }
  .resource-topcard--media,
  .resource-cover{
    max-width: none !important;
  }
}

/* Reading comfort: keep paragraphs from becoming train tracks */
.resource-direct p,
.resource-section p{
  max-width: 75ch !important;
}


/* =======================================================================
   RESOURCE PAGE – LAYOUT FINAL (clean)
   - Un seul wrapper pour TOP (2 cards) + ARTICLE + FAQ
   - Colonnes 50/50 sur desktop, gap non débile (pas en %)
   - Texte non bridé par des max-width incohérents
   ======================================================================= */

/* =======================================================================
   RESOURCE PAGE — SINGLE LAYOUT (clean)
   Goal: same left/right edges for TOP cards + ARTICLE + FAQ
   ======================================================================= */

/* One wrapper to rule them all */
.resources-container{
  max-width: none !important;
  width: min(1180px, calc(100% - 48px)) !important; /* stable, readable */
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Free children from any old caps */
.resource-top,
.resource-top-grid,
.resource-article,
.resource-faq{
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Top: 2 equal cards + controlled gap (no “zoom canyon”) */
.resource-top-grid{
  display: grid !important;
  grid-template-columns: 1fr !important; /* mobile default */
  gap: clamp(12px, 1.6vw, 20px) !important;
  align-items: stretch !important;
}

@media (min-width: 981px){
  .resource-top-grid{ grid-template-columns: 1fr 1fr !important; }
}

/* Cards fill their cells */
.resource-top-grid > .resource-topcard{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* Media cover must fill */
.resource-topcard--media .resource-cover{
  width: 100% !important;
  max-width: none !important;
}

/* More breathing room between the top cards and the first section title */
.resource-top{
  margin-bottom: 34px !important;
}

/* Article text: do not cap width (wrapper already caps it) */
.resource-article p,
.resource-direct p,
.resource-section p{
  max-width: none !important;
}

/* Bullets: left aligned, slightly indented vs paragraph */
.resource-bullets{
  padding-left: 22px !important;
  margin-top: 10px !important;
}

/* FAQ: force same boundaries as wrapper (this is the part that was “degueulasse”) */
.resource-faq{
  display: flex !important;              /* ensures children can stretch */
  flex-direction: column !important;
  align-items: stretch !important;       /* key: no shrink/centering */
  gap: 10px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.resource-faq-item{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;                  /* spacing handled by .resource-faq gap */
  box-sizing: border-box !important;
}


/* ===== TOP LEFT CARD: center content vertically (desktop only) ===== */
@media (min-width: 981px){
  /* only the LEFT card (not the media card) */
  .resource-top-grid > .resource-topcard:not(.resource-topcard--media){
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering */
  }
}

/* ==== FIX TOC (Sommaire) : pas de puces + espace cohérent au-dessus ==== */
.resource-topcard .resource-toc{
  list-style: none;
  margin: 6px 0 0;
  padding-left: 0;
}
.resource-topcard .resource-toc li{
  margin: 4px 0;
  padding-left: 0;
}

/* Espace au-dessus de SOMMAIRE (TOC) = même logique que le bloc FAQ dessous */
.resource-topcard #direct-answer + .resource-box{
  margin-top: 12px;
}

/* ==== TOP CARD (left) : séparateurs fins + spacing cohérent ==== */

/* Ligne fine sous "Résumé" / "Sommaire" / "FAQ" (titres h2 dans la topcard) */
.resource-topcard .resource-box-title{
  border-bottom: 1px solid rgba(237,223,207,0.18);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

/* Espace entre Sommaire (resource-box) et FAQ (resource-box) = même logique que Résumé -> Sommaire */
.resource-topcard .resource-box + .resource-box{
  margin-top: 12px;
}

/* ==== Résumé (topcard) : paragraphe justifié + interligne réduit ==== */


/* ==== FINAL TYPOS (2026-01-02): interligne homogène 1.45 ==== */
.resource-topcard .resource-direct p{
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.45 !important;
}
.resource-topcard .resource-toc{ line-height: 1.45 !important; }
.resource-section p{ line-height: 1.45 !important; }

/* ==== TITRES SECTIONS: séparateur fin ==== */
.resource-section h2{
  border-bottom: 1px solid rgba(237,223,207,0.18);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* ==== Bullets: interligne cohérent ==== */
.resource-bullets li{ line-height: 1.45; }

/* ==== UI FAQ = SECTION 5 (2026-01-02) ==== */

/* Titre FAQ du bas: même logique visuelle que les h2 des sections */
.resource-faq > h2,
h2#faq{
  border-bottom: 1px solid rgba(237,223,207,0.18);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* Espace de confort avant la bottom bar */
.resource-faq{ margin-bottom: 70px !important; }
.resource-article{ padding-bottom: 70px !important; }

/* ==== UI FAQ GAP FIX (2026-01-02) ==== */
/* Réduit l'espace entre la fin de la section 4 et le titre 5 */
h2#faq{
  margin-top: 18px !important;
}

/* Le bloc FAQ ne doit pas rajouter un grand vide au-dessus */
.resource-faq{
  margin-top: 10px !important;
}

/* Confort avant la bottom bar (on garde) */
.resource-faq{ margin-bottom: 80px !important; }
.resource-article{ padding-bottom: 80px !important; }

/* ==== UI FAQ SPACING (2026-01-02) ==== */
/* Réduit l'écart entre la dernière section et la FAQ */
.resource-section + .resource-faq{ margin-top: 18px !important; }

/* Confort visuel avant la bottom bar */
.resource-faq{ margin-bottom: 70px !important; }
.resource-article{ padding-bottom: 70px !important; }

/* ==== UI FAQ CLEANUP (2026-01-02) ==== */

/* Réduit l'espace entre la section 4 et la FAQ */
.resource-faq{
  margin-top: 18px !important;
}

/* Confort avant la bottom bar (sans faire un gouffre) */
.resource-article{
  padding-bottom: 60px !important;
}

/* UI fix: réduire l’espace entre la dernière section et la FAQ */
.resource-article + .resource-faq { margin-top: 18px; }

/* UI fix: supprimer le gros “trou” entre la dernière section et la FAQ */
.resource-article .resource-section:last-of-type {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.resource-article .resource-section:last-of-type > *:last-child {
  margin-bottom: 0 !important;
}
.resource-article + .resource-faq {
  margin-top: 12px !important;
  padding-top: 0 !important;
}

/* UI fix (v2): aligner l’espace avant la FAQ sur les espaces “normaux” entre sections */
.resource-article .resource-section:last-of-type {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* la liste de bullets de la dernière section (souvent la cause du “trou”) */
.resource-article .resource-section:last-of-type .resource-bullets {
  margin-bottom: 0 !important;
}

/* le bloc FAQ lui-même ne doit pas “repousser” */
.resource-article + .resource-faq {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* le titre FAQ ne doit pas rajouter un espace inutile */
.resource-faq > .resource-box-title {
  margin-top: 0 !important;
}

/* UI fix (v3): l’espace “énorme” avant la FAQ vient du bas de l’article */
.resource-article {
  margin-bottom: 18px !important;  /* ajuste si besoin (12/18) */
  padding-bottom: 0 !important;
}

/* ===== UI fix (Resources listing): intro humain, bouton discret, extrait 3 lignes ===== */

/* Intro: lisible, pas marketing interne */
.resources-intro{
  max-width: 860px;
  margin: 10px auto 0;
  line-height: 1.5;
  opacity: .95;
}

/* Extrait: 3 lignes max + ellipsis + justification */
.resource-excerpt{
  margin: 0 0 12px;
  line-height: 1.35;
  opacity: .95;

  /* clamp 3 lignes */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;

  /* rendu texte */
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Bouton "Lire →" discret (sobriété, pas un panneau publicitaire) */
.resource-open{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(237,223,207,0.35);
  background: rgba(0,0,0,0.10);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.resource-open:hover{
  background: rgba(237,223,207,0.10);
  border-color: rgba(237,223,207,0.65);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ===== UI polish: hover sans "jitter" (une seule animation = la carte) ===== */

/* Quand la carte bouge, on évite que la vignette rebouge aussi */
.resource-card:hover .resource-card-thumb{
  transform: none !important;
}

/* Le bouton ne doit pas se déplacer: seulement couleur/bordure */
.resource-open:hover{
  transform: none !important;
}
