/* ============================================
   agitateur_v7.css - v9.0 - 11/2026
   Compatible Bootstrap 5.3.8
   Optimisé & Nettoyé
   ============================================ */

/* ---------- Variables ---------- */
:root {
  --funky-orange: #ff6600;
  --funky-orange-dark: #e65c00;
  --funky-orange-light: #ffb380;
  --funky-orange-bg: rgba(255, 102, 0, 0.25);
  --funky-black: #000000;
  --funky-paper: #f8f4f0;
  --funky-text: #212529;
  --funky-muted: #6c757d;
  --funky-secondary: #495057;
  
  /* Variables Forum */
  --bulle-border: #adb5bd;
  --bulle-bg: #ffffff;
  --bulle-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

/* ============================================
   BASE & TYPOGRAPHIE GÉNÉRALE
   ============================================ */

/* Gestion du Body (Fix Navbar & Scroll) */
body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  padding-top: 125px !important; /* Compense la navbar fixe */
}
@media (min-width: 992px) {
  body {
    padding-top: 135px !important;
  }
}

/* Typographie standard */
.logo {
  margin: 0 0 0.5rem;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -1px;
  font-weight: bold;
  color: inherit;
  text-rendering: optimizeLegibility;
}
.logo::first-letter {
  color: var(--funky-orange);
}

.titre_rubrique {
  padding: 0 0 0 15px;
  margin: 0 0 5px;
  border-left: 5px solid var(--funky-orange);
  text-transform: uppercase;
  font-weight: bold;
  font-size: 18px;
  color: #999;
}
.titre_rubrique a { color: #999; }

.une h1 { font-size: 22px; line-height: 28px; margin-bottom: 0; }
.une img { float: left; margin: 0 5px 5px 0; }
h1.mrub { font-size: 14px; line-height: 20px; font-weight: bold; margin: 3px 0 4px; }
.mrub a { color: var(--funky-orange); }
.resize img { max-height: 150px; max-width: 250px; height: auto; width: auto; float: left; margin: 0 10px 3px 0; }
.date, .date_breve { margin-bottom: 10px; font-weight: bold; }
.edito h1, .rdw h1 { margin-bottom: 0; }
.surtitre { font-size: 1.2em; font-weight: bold; margin-bottom: 0.5em; }
.soustitre { font-size: 1.5em; font-weight: bold; margin: 0.5em 0; }

/* ============================================
   ENCARTS PS / NOTES / CITATIONS
   ============================================ */
.ps {
  background-color: silver;
  border-radius: 1.2em;
  padding: 1em;
  margin: 1em;
  font-size: 0.9em;
}
.notes {
  clear: both;
  margin: 1em;
  margin-top: 0;
  padding: 0.7em;
  padding-top: 0;
  border-top: 1px solid #CCC;
  font-size: 0.9em;
}
.ps h2, .notes h2 {
  font-size: 1.19em;
  font-weight: bold;
  margin: 0;
  padding: 0;
}
blockquote { margin: 1em 0; }
blockquote p { margin: 0; font-size: 1em; }

/* ============================================
   BULLES / TRIANGLES (Ancien forum legacy)
   ============================================ */
.triangle-border {
  position: relative;
  padding: 15px;
  margin: 1em 0 3em;
  border: 2px solid var(--funky-orange);
  color: #333;
  background: #eee;
  border-radius: 10px;
}
.triangle-border.left { margin-left: 30px; }
.triangle-border.right { margin-right: 30px; }
.triangle-border blockquote { border-color: var(--funky-orange); }

.triangle-border:before,
.triangle-border:after {
  content: "";
  position: absolute;
  display: block;
  width: 0;
  border-style: solid;
}
.triangle-border:before {
  bottom: -20px;
  left: 40px;
  border-width: 20px 20px 0;
  border-color: var(--funky-orange) transparent;
}
.triangle-border:after {
  bottom: -18px;
  left: 42px;
  border-width: 18px 18px 0;
  border-color: #eee transparent;
}
.triangle-border.top { margin-left: 30px; }
.triangle-border.top.nivn { margin-left: 60px; }
.triangle-border.top:before {
  top: -20px; bottom: auto; left: auto; right: 40px;
  border-width: 0 20px 20px;
}
.triangle-border.top:after {
  top: -18px; bottom: auto; left: auto; right: 42px;
  border-width: 0 18px 18px;
}
.triangle-border.left:before {
  top: 10px; bottom: auto; left: -30px;
  border-width: 15px 30px 15px 0;
  border-color: transparent #5a8f00;
}
.triangle-border.left:after {
  top: 16px; bottom: auto; left: -21px;
  border-width: 9px 21px 9px 0;
  border-color: transparent #fff;
}
.triangle-border.right:before {
  top: 10px; bottom: auto; left: auto; right: -30px;
  border-width: 15px 0 15px 30px;
  border-color: transparent #5a8f00;
}
.triangle-border.right:after {
  top: 16px; bottom: auto; left: auto; right: -21px;
  border-width: 9px 0 9px 21px;
  border-color: transparent #fff;
}
.previsu { border: 2px dashed var(--funky-orange); }

/* ============================================
   MESSAGES FORUM (SPIP legacy)
   ============================================ */
.basdemessage { border-top: 1px dashed #3060A0; margin-top: 1em; padding-top: 0.5em; }
.barretitremessage { border-bottom: 1px dashed #3060A0; margin-bottom: 0.5em; padding-bottom: 0.5em; }
.titremessage { font-size: small; font-weight: bold; }
.auteurmessage { font-size: x-small; font-weight: bold; color: maroon; }
.datemessage { font-size: x-small; }
.nouveaumessage { float: right; margin: 0; padding: 0; font-size: x-small; font-weight: bold; color: green; }
.repondremessage a { float: right; margin: 0 0.5em 0 0; padding: 0; text-decoration: none; color: black; font-size: x-small; font-weight: bold; }
.repondremessage a:hover { text-decoration: underline; }
.reponda a { margin: 0; padding: 0; text-decoration: underline; color: black; }
.reponda a:hover { color: red; }

/* ============================================
   VIDÉO RESPONSIVE
   ============================================ */
.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ============================================
   NAVBAR 2 NIVEAUX
   ============================================ */

/* Structure globale de la navbar */
.navbar-navbar {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background-color: var(--bs-body-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  /* Force la navbar à rester indépendante du viewport mobile */
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

/* Niveau 1 : Barre utilitaire */
.navbar-navbar > .navbar {
  --bs-navbar-padding-y: 0.5rem;
}

/* Transparence / blur (Desktop) */
.navbar {
  --bs-navbar-padding-y: 0.5rem;
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  background-color: rgba(var(--bs-body-bg-rgb), 0.92) !important;
}
@supports not (backdrop-filter: blur(8px)) {
  .navbar { background-color: var(--bs-body-bg) !important; }
}

/* Niveau 2 : Menu rubriques */
.navbar-menu-secondaire {
  position: static !important; /* Dans le flux du header fixe */
  background-color: #f8f9fa !important; 
  border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  overflow: hidden !important;
}

/* Conteneur scrollable niveau 2 */
.menu-scroll {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: #ff6600 #f0f0f0;
  -webkit-overflow-scrolling: touch;
}
.menu-scroll::-webkit-scrollbar { height: 4px; }
.menu-scroll::-webkit-scrollbar-track { background: #f0f0f0; }
.menu-scroll::-webkit-scrollbar-thumb { background-color: #ff6600; border-radius: 4px; }

/* Liens du niveau 2 */
.menu-scroll .nav-link {
  color: #343a40 !important;
  font-weight: 600 !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: var(--bs-border-radius);
  transition: all 0.2s ease;
}
.menu-scroll .nav-link::first-letter {
  color: var(--funky-orange) !important;
}
.menu-scroll .nav-link:hover,
.menu-scroll .nav-link:focus {
  color: #ff6600 !important;
  background-color: transparent !important; 
}
.menu-scroll .nav-link.active {
  color: #ffffff !important;
  background-color: #ff6600 !important;
  font-weight: 700 !important;
}

/* Logo responsive */
.navbar-logo {
  height: clamp(32px, 3.5vw, 42px);
  width: auto;
  max-width: 100%;
  display: block;
}
@supports not (height: clamp(1px, 1vw, 2px)) {
  .navbar-logo { height: 36px; }
  @media (min-width: 992px) { .navbar-logo { height: 45px; } }
}
@media (max-width: 400px) {
  .navbar-brand .navbar-logo { width: 130px; height: auto; }
}

/* Barre de recherche */
.navbar-search { width: 220px; }
@media (max-width: 1200px) { .navbar-search { width: 160px; } }

/* Bouton utilisateur */
#userMenuButton {
  min-width: 44px;
  justify-content: center;
  --bs-btn-color: #000;
  --bs-btn-border-color: #000;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #ffe0cc;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #ffc299;
  --bs-btn-active-border-color: #000;
}
#userMenuButton svg { color: var(--funky-orange); }

/* ============================================
   NAVBAR : RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 991.98px) {
  .d-flex.align-items-center .dropdown { margin-right: 0.5rem; }
  #userMenuButton span { display: none !important; }
  
  .navbar-menu-secondaire { padding: 0.25rem 0; }
  .menu-scroll {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: auto;
    justify-content: flex-start !important; 
  }
  .menu-scroll .nav-link { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
  
  .navbar input, .navbar select, .navbar textarea { font-size: 16px; }
}

/* Liens navbar desktop */
@media (min-width: 992px) {
  .navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--bs-border-radius);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  }
  .navbar .nav-link:hover,
  .navbar .nav-link:focus {
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
  }
  .navbar .nav-link.active { color: var(--bs-primary) !important; font-weight: 600; }
  .navbar .dropdown-menu { border-radius: var(--bs-border-radius-lg); padding: 0.5rem; box-shadow: var(--bs-box-shadow); }
  .navbar .dropdown-item { border-radius: var(--bs-border-radius); padding: 0.4rem 0.75rem; transition: background-color 0.15s ease-in-out; }
  .navbar .dropdown-item.active { background-color: var(--bs-primary); color: #fff; }
  .border-lg-start { border-left: 1px solid var(--bs-border-color) !important; }
}

/* ============================================
   OFFCANVAS / MENU MOBILE
   ============================================ */
.offcanvas-start, .offcanvas-end { width: min(320px, 85vw); }
.offcanvas-end { width: min(320px, 90vw); }
.offcanvas-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1rem; }
.offcanvas-body .nav-link { padding: 0.75rem 0.5rem; border-radius: 0; }
.offcanvas-body .nav-item:last-child .nav-link { border-bottom: 0; }
.offcanvas-body .dropdown-menu {
  position: static !important;
  transform: none !important;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0.25rem 0 0.5rem 1rem;
  border: 0;
  border-left: 3px solid var(--bs-primary);
  border-radius: 0;
  background-color: var(--bs-tertiary-bg);
  box-shadow: none;
}
.offcanvas-body .dropdown-item { padding: 0.5rem 0.75rem; font-size: 0.95rem; border-radius: var(--bs-border-radius); }

@media (max-width: 991.98px) {
  .offcanvas-body .nav-link, .offcanvas-body .dropdown-item {
    min-height: 44px; display: flex; align-items: center; padding: 0.65rem 0.75rem;
  }
  .offcanvas-body > .navbar-nav > .nav-item > .nav-link {
    font-weight: 500; font-size: 1.05rem; border-radius: 0;
  }
  .user-menu-mobile { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--bs-border-color); }
  .user-menu-mobile .btn { padding: 0.75rem 1rem; font-size: 1rem; }
  .user-menu-mobile .dropdown-menu { position: static !important; width: 100%; margin-top: 0.5rem; border: 0; background-color: var(--bs-tertiary-bg); }
}

/* ============================================
   BURGER & ACCESSIBILITÉ
   ============================================ */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff6600' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff6600' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler:focus:not(:focus-visible) {
  outline: none !important; box-shadow: none !important; -webkit-tap-highlight-color: transparent;
}
.navbar-toggler:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.navbar-toggler:active { outline: none; box-shadow: none; background-color: transparent; }
@media (hover: none) {
  .navbar-toggler:hover { background-color: transparent; border-color: transparent; }
}
.navbar .nav-link:focus-visible,
.navbar .dropdown-item:focus-visible,
.navbar .btn-link:focus-visible,
.navbar-navbar .nav-link:focus-visible,
#userMenuButton:focus-visible,
.navbar-toggler:focus-visible {
  outline: 2px solid var(--bs-primary); outline-offset: 2px;
}

/* ============================================
   STRUCTURE ARTICLE
   ============================================ */
main, .container.mt-4 { 
  margin-top: 0 !important; 
}

@media (min-width: 992px) {
  main, .container.mt-4 { 
    margin-top: 0 !important; 
  }
}

.article-header {
  max-width: 58rem;
  margin-left: auto; margin-right: auto;
  padding: 0;
  border-bottom: none !important;
}
.article-surtitre {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--funky-orange); margin-bottom: 0.5rem;
}
.article-titre {
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  font-weight: 800; line-height: 1.1; color: var(--funky-black); margin-bottom: 1rem;
}
.article-titre::first-letter { color: var(--funky-orange); }
.article-soustitre {
  font-size: clamp(1.1rem, 2vw + 0.5rem, 1.5rem);
  font-weight: 400; color: var(--bs-secondary-color); margin-bottom: 1.5rem;
}
.article-meta {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--bs-secondary-color); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 2rem;
}
.article-meta .meta-sep { color: var(--bs-border-color); }
.article-chapo {
  font-size: clamp(1.2rem, 2vw + 0.5rem, 1.5rem);
  line-height: 1.5; font-weight: 600; color: var(--funky-black);
  margin: 1rem 0 3rem; border-left: 4px solid var(--funky-orange); padding-left: 1.5rem;
}

/* Corps d'article */
.article-body {
  max-width: 100%; margin-left: auto; margin-right: auto; padding: 0 1rem;
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.15rem);
  line-height: 1.7; color: var(--funky-text);
}
.article-body p, .card-body p { margin-bottom: 1.5rem; }
.texte-principal {
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.25rem);
  line-height: 1.75; color: var(--funky-text);
}
.texte-principal p { margin-bottom: 1.5rem; }
.texte-principal h2 {
  font-size: clamp(1.4rem, 2vw + 0.5rem, 1.8rem);
  font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3;
}
.texte-principal h3 {
  font-size: clamp(1.2rem, 1.5vw + 0.5rem, 1.4rem);
  font-weight: 700; margin: 2rem 0 0.75rem;
}
.texte-principal a, .forum-texte a {
  color: var(--funky-orange); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; transition: all 0.2s;
}
.texte-principal a:hover, .forum-texte a:hover {
  color: var(--funky-orange-dark); text-decoration-thickness: 2px;
}
.texte-principal ul, .texte-principal ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.texte-principal li { margin-bottom: 0.5rem; }
.texte-principal blockquote {
  border-left: 4px solid var(--funky-orange);
  padding: 1rem 1.5rem; margin: 2rem 0;
  font-style: italic; font-size: 1.15rem;
  color: var(--funky-secondary); background-color: #f8f9fa; border-radius: 0 8px 8px 0;
}
.texte-principal img { border-radius: 8px; margin-bottom: 1.5rem; }
.texte-principal .spip_documents { margin: 2rem 0; }
.texte-principal .spip_doc_titre { font-size: 0.875rem; color: var(--funky-muted); text-align: center; margin-top: 0.5rem; }

/* PS / Notes */
.article-ps, .article-notes {
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.05rem);
  line-height: 1.65; color: var(--funky-secondary);
}
.article-ps { padding: 1.5rem; background-color: #f8f9fa; border-radius: 8px; border-left: 4px solid var(--funky-orange); }
.article-notes { padding-top: 1.5rem; border-top: 1px solid #dee2e6; }
.notes-contenu { font-size: 0.9rem; color: var(--funky-muted); }

/* Mise en page Magazine */
.article-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 992px) {
  .article-layout { grid-template-columns: minmax(0, 42rem) 14rem; justify-content: center; gap: 2rem; }
  .article-sidenotes { font-size: 0.85rem; color: var(--funky-muted); }
  .article-sidenotes .article-notes { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; }
  .article-layout:not(:has(.article-sidenotes .spip_note)) { grid-template-columns: 1fr !important; max-width: 42rem; margin-left: auto; margin-right: auto; }
}
.article-main { min-width: 0; }

/* ============================================
   SIDEBAR & BLOCS DIVERS
   ============================================ */
.card-breves, .card-forum {
  border-top: 4px solid var(--funky-orange) !important;
  border-radius: 0 0 8px 8px;
  background-color: #ffffff;
  transition: box-shadow 0.3s ease;
}
.card-breves:hover { box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important; }
.breve-item { border-bottom: 1px solid #f0f0f0; }
.breve-item:last-child { border-bottom: none !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
.breve-date { font-size: clamp(0.7rem, 1vw + 0.2rem, 0.75rem); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--funky-orange); }
.breve-titre { font-size: clamp(0.9rem, 1.2vw + 0.4rem, 1rem); line-height: 1.3; }
.breve-titre a { color: var(--funky-text); transition: color 0.2s; }
.breve-titre a:hover { color: var(--funky-orange); }
.breve-intro { font-size: clamp(0.8rem, 1vw + 0.25rem, 0.85rem); line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.breve-intro p { margin-bottom: 0.25rem; }
.breve-intro p:last-child { margin-bottom: 0; }

/* Recherche */
.card-divers .formulaire_spip { margin: 0; }
.card-divers .formulaire_recherche form { display: flex; flex-wrap: nowrap; align-items: stretch; width: 100%; margin: 0; }
.card-divers .formulaire_recherche input.text,
.card-divers .formulaire_recherche input[type="text"],
.card-divers .formulaire_recherche input[type="search"] {
  flex: 1 1 auto; min-width: 0; width: 100% !important; padding: 0.5rem 0.75rem; font-size: 0.85rem;
  color: var(--funky-text); background-color: #f8f9fa; border: 1px solid #dee2e6; border-right: 0;
  border-radius: 0.375rem 0 0 0.375rem; margin: 0; box-sizing: border-box;
}
.card-divers .formulaire_recherche input:focus {
  background-color: #fff; border-color: var(--funky-orange-light); outline: 0; box-shadow: 0 0 0 0.25rem var(--funky-orange-bg); z-index: 2;
}
.card-divers .formulaire_recherche input[type="submit"],
.card-divers .formulaire_recherche input[type="image"],
.card-divers .formulaire_recherche .btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 0.5rem 0.75rem; font-size: 0.85rem;
  color: #fff !important; background-color: var(--funky-orange) !important; border: 1px solid var(--funky-orange) !important;
  border-radius: 0 0.375rem 0.375rem 0; cursor: pointer; margin: 0; transition: background-color 0.15s ease-in-out;
}
.card-divers .formulaire_recherche input[type="submit"]:hover,
.card-divers .formulaire_recherche input[type="image"]:hover,
.card-divers .formulaire_recherche .btn:hover {
  background-color: var(--funky-orange-dark) !important; border-color: var(--funky-orange-dark) !important;
}
.card-divers .formulaire_recherche label { display: none; }

/* ============================================
   FORMULAIRE FORUM (Repliable & Compact)
   ============================================ */
.card-forum-discret {
  border-left: 4px solid var(--funky-orange) !important;
  border-radius: 8px;
  background-color: #fbfbfb;
}
.card-forum-discret .card-body { padding: 1rem; } /* Plus compact */

.formulaire-forum-wrapper .formulaire_spip { margin: 0; }

/* Champs de saisie */
.formulaire-forum-wrapper .formulaire_spip input[type="text"],
.formulaire-forum-wrapper .formulaire_spip input[type="email"],
.formulaire-forum-wrapper .formulaire_spip input[type="url"] {
  display: block; width: 100% !important; padding: 0.4rem 0.75rem; font-size: 0.85rem;
  border-radius: 50px; border: 1px solid #dee2e6; background-color: #fff; margin-bottom: 0.5rem;
}
.formulaire-forum-wrapper .formulaire_spip textarea {
  width: 100% !important; min-height: 80px; padding: 0.6rem 1rem; font-size: 0.9rem;
  border-radius: 12px; border: 1px solid #dee2e6; background-color: #fff; margin-bottom: 0.5rem;
}

/* Mise en page des champs courts */
.formulaire-forum-wrapper .formulaire_spip .saisie_input {
  display: inline-block; vertical-align: top; width: calc(50% - 0.25rem); margin-right: 0.25rem;
}
.formulaire-forum-wrapper .formulaire_spip .saisie_input:nth-child(even) { margin-right: 0; }

/* Labels et Aide */
.formulaire-forum-wrapper .formulaire_spip label { display: none !important; }
.formulaire-forum-wrapper .formulaire_spip p.text-info {
  color: var(--funky-muted) !important; font-size: 0.8rem; font-style: italic; margin-top: -0.5rem; margin-bottom: 1rem;
}
.formulaire-forum-wrapper .formulaire_spip p.text-info a {
  color: var(--funky-black) !important; text-decoration: underline; font-weight: bold;
}
.formulaire-forum-wrapper .formulaire_spip p.text-info strong,
.formulaire-forum-wrapper .formulaire_spip p.text-info b {
  color: var(--funky-orange) !important;
}

/* Boutons du formulaire */
.formulaire-forum-wrapper .formulaire_spip input[type="submit"],
.formulaire-forum-wrapper .formulaire_spip button[type="submit"] {
  display: inline-block; padding: 0.4rem 1.5rem; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #fff !important;
  background-color: var(--funky-orange) !important; border: 1px solid var(--funky-orange) !important;
  border-radius: 50px; cursor: pointer; transition: all 0.2s ease; margin-top: 0.5rem;
}
.formulaire-forum-wrapper .formulaire_spip input[type="submit"]:hover,
.formulaire-forum-wrapper .formulaire_spip button[type="submit"]:hover {
  background-color: var(--funky-orange-dark) !important; border-color: var(--funky-orange-dark) !important;
}

/* Bouton Prévisualiser spécifique */
.formulaire-forum-wrapper .formulaire_spip input[type="submit"][name="previsualiser"],
.formulaire-forum-wrapper .formulaire_spip button[type="submit"][name="previsualiser"],
.formulaire-forum-wrapper .formulaire_spip .btn-preview {
  background-color: transparent !important;
  border: 2px solid var(--funky-black) !important;
  color: var(--funky-black) !important;
  font-weight: 800 !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px !important;
  padding: 0.25rem 0.75rem;
}
.formulaire-forum-wrapper .formulaire_spip input[type="submit"][name="previsualiser"]:hover,
.formulaire-forum-wrapper .formulaire_spip button[type="submit"][name="previsualiser"]:hover,
.formulaire-forum-wrapper .formulaire_spip .btn-preview:hover {
  background-color: transparent !important;
  border-color: var(--funky-black) !important;
  color: var(--funky-black) !important;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--funky-black);
}

/* Responsive Formulaire */
@media (max-width: 767.98px) {
  .formulaire-forum-wrapper .formulaire_spip .saisie_input {
    display: block; width: 100%; margin-right: 0;
  }
}

/* ============================================
   FORUM : Bulles de BD (Funky)
   ============================================ */
.bulle-bd {
  position: relative;
  background-color: var(--bulle-bg);
  border: 2px solid var(--bulle-border);
  border-radius: 12px;
  box-shadow: var(--bulle-shadow);
  margin-bottom: 2.5rem;
  transition: transform 0.2s ease;
  max-width: 100%;
  overflow: hidden;
}
.bulle-bd:hover { transform: translateY(-2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15); }
.bulle-contenu { padding: 1.25rem; }
.bulle-bd::before, .bulle-bd::after {
  content: ""; position: absolute; left: 40px; width: 0; height: 0; border-style: solid;
}
.bulle-queue-bas::before { bottom: -20px; border-width: 20px 15px 0; border-color: var(--bulle-border) transparent transparent transparent; }
.bulle-queue-bas::after { bottom: -17px; left: 42px; border-width: 18px 13px 0; border-color: var(--bulle-bg) transparent transparent transparent; }
.bulle-queue-haut::before { top: -20px; border-width: 0 15px 20px; border-color: transparent transparent var(--bulle-border) transparent; }
.bulle-queue-haut::after { top: -17px; left: 42px; border-width: 0 13px 18px; border-color: transparent transparent var(--bulle-bg) transparent; }

/* Textes forum */
.forum-header { font-size: 0.95rem; border-bottom: 2px dashed #e9ecef; padding-bottom: 0.5rem; }
.forum-titre { color: var(--funky-black) !important; font-weight: 800; text-transform: uppercase; font-size: 1.1rem; }
.forum-auteur { color: var(--funky-orange) !important; font-weight: bold; }
.forum-date { font-size: clamp(0.75rem, 1vw + 0.2rem, 0.85rem); font-style: italic; color: var(--funky-muted); }
.forum-texte { font-size: clamp(1rem, 1.2vw + 0.5rem, 1.1rem); line-height: 1.6; color: var(--funky-text); }
.forum-footer { font-size: 0.85rem; border-top: 2px dashed #e9ecef; padding-top: 0.75rem; }
.forum-texte, .forum-texte * { overflow-wrap: break-word !important; word-wrap: break-word !important; word-break: break-word !important; }

/* Bouton "Répondre" dans les bulles */
.forum-footer a.btn-outline-secondary {
  background-color: transparent !important;
  border: 2px solid var(--funky-black) !important;
  color: var(--funky-black) !important;
  font-weight: 700 !important;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px !important;
  padding: 0.15rem 0.5rem;
  line-height: 1.2;
  transition: all 0.2s ease;
}
.forum-footer a.btn-outline-secondary:hover {
  background-color: transparent !important;
  border-color: var(--funky-black) !important;
  color: var(--funky-black) !important;
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--funky-black);
}
.forum-footer a.btn-outline-secondary:active { transform: translateY(0); box-shadow: none; }

/* Indentation des réponses */
.forum-reponses { position: relative; padding-left: 0; }
@media (min-width: 768px) { .forum-reponses { margin-left: 3rem; } }
@media (max-width: 767.98px) {
  .forum-reponses { margin-left: 1rem; }
  .bulle-bd::before, .bulle-bd::after { left: 20px; }
  .bulle-queue-bas::after { left: 22px; }
  .bulle-queue-haut::after { left: 22px; }
}

/* Animation Apparition au scroll */
.bulle-bd.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.bulle-bd.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .bulle-bd.animate-on-scroll { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   PIED DE PAGE
   ============================================ */
.footer-custom {
  background-color: #f8f9fa;
  border-top: 4px solid var(--funky-orange);
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 1.5rem;
}
.footer-custom .container { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
.fw-black { font-weight: 900 !important; letter-spacing: -0.05em; }
.footer-brand { letter-spacing: -0.08em; }
.footer-title { letter-spacing: 0.05em; color: #343a40; }
.footer-links a { display: inline-block; color: var(--funky-text); text-decoration: none; padding: 0.25rem 0; font-weight: 500; font-size: 0.95rem; transition: all 0.2s ease; border-bottom: 2px solid transparent; }
.footer-links a:hover { color: var(--funky-orange); border-bottom-color: var(--funky-orange); transform: translateX(5px); }
.footer-custom .btn-outline-dark { border-color: #adb5bd; color: var(--funky-text); }
.footer-custom .btn-outline-dark:hover { background-color: var(--funky-black); border-color: var(--funky-black); color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 0 rgba(0,0,0,0.1); }
.footer-custom .btn-primary { background-color: var(--funky-orange); border-color: var(--funky-orange); }
.footer-custom .btn-primary:hover { background-color: var(--funky-orange-dark); border-color: var(--funky-orange-dark); }
.footer-custom .btn-dark { background-color: var(--funky-black); border-color: var(--funky-black); }
@media (max-width: 767.98px) {
  .footer-custom { text-align: center; }
  .footer-links a:hover { transform: none; }
  .footer-custom .d-flex.flex-wrap { justify-content: center; }
  .footer-custom .ms-auto { margin-left: 0 !important; margin-top: 1rem; display: block; width: 100%; }
}

/* On cible la première lettre du nom du site dans le footer */
.footer-brand::first-letter {
  color: var(--funky-orange) !important;
}

/* ============================================
   NOTES : Zone tactile et Images flottantes
   ============================================ */
@media (max-width: 991.98px) {
  .texte-principal a.spip_note, .forum-texte a.spip_note {
    display: inline-block; padding: 0.5rem 1rem; margin: -0.5rem -1rem;
    font-size: 0.95rem; font-weight: 700; color: var(--funky-orange) !important; text-decoration: none;
  }
}
.texte-principal .spip_documents { margin: 1rem 0 1.5rem 0; max-width: 100%; }
.texte-principal .spip_documents_left { float: left; margin-right: 1.5rem; margin-bottom: 1rem; max-width: 50%; }
.texte-principal .spip_documents_right { float: right; margin-left: 1.5rem; margin-bottom: 1rem; max-width: 50%; }
.texte-principal .spip_documents img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); display: block; }
.texte-principal .spip_doc_titre, .texte-principal .spip_doc_descriptif {
  margin-top: 0.25rem; font-family: 'Georgia', serif; font-size: 0.85rem; font-style: italic; color: var(--funky-muted); line-height: 1.4;
}
@media (max-width: 767.98px) {
  .texte-principal .spip_documents_left, .texte-principal .spip_documents_right { float: none !important; margin: 1rem auto; max-width: 100%; }
}

/* ============================================
   MODE SOMBRE : Ajustements Funky
   ============================================ */

/* On ajuste les variables globales pour le mode sombre */
[data-bs-theme="dark"] {
  --funky-text: #e9ecef;
  --funky-muted: #adb5bd;
  --funky-secondary: #ced4da;
  --bulle-bg: #212529;       /* Fond des bulles en sombre */
  --bulle-border: #495057;   /* Bordure des bulles plus discrète */
  --bs-body-bg: #121212;     /* Fond général très sombre */
}

/* Niveau 2 de la navbar */
[data-bs-theme="dark"] .navbar-menu-secondaire {
  background-color: #1a1a1a !important;
  border-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .menu-scroll .nav-link {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .menu-scroll .nav-link:hover {
  color: var(--funky-orange) !important;
}

/* Footer */
[data-bs-theme="dark"] .footer-custom {
  background-color: #1a1a1a;
  border-top-color: var(--funky-orange);
}
[data-bs-theme="dark"] .footer-brand,
[data-bs-theme="dark"] .footer-title,
[data-bs-theme="dark"] .footer-links a {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .footer-links a:hover {
  color: var(--funky-orange) !important;
}

/* Formulaires (Recherche & Forum) */
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip input,
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip textarea,
[data-bs-theme="dark"] .card-divers .formulaire_recherche input {
  background-color: #2c2c2c;
  border-color: #495057;
  color: #e9ecef;
}

/* Textes spécifiques */
[data-bs-theme="dark"] .forum-texte {
  color: #e9ecef;
}
[data-bs-theme="dark"] .forum-titre {
  color: #ffffff !important;
}
[data-bs-theme="dark"] .article-titre,
[data-bs-theme="dark"] .article-chapo {
  color: #ffffff;
}
[data-bs-theme="dark"] .texte-principal {
  color: #e9ecef;
}
[data-bs-theme="dark"] .texte-principal blockquote {
  background-color: #2c2c2c;
}

/* Champs de formulaire */
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip input:focus,
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip textarea:focus {
  background-color: #2c2c2c;
  border-color: var(--funky-orange-light);
}

/* Menu burger */
[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ff6600' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   MODE SOMBRE : Correctifs Navbar & Sidebar
   ============================================ */

/* --- 1. NAVBAR : Le logo et les boutons --- */
/* Si votre logo SVG est noir, on le force en blanc en mode sombre */
/*
[data-bs-theme="dark"] .navbar-brand img,
[data-bs-theme="dark"] .navbar-logo {
  filter: brightness(0) invert(1);
}
*/
/* Le bouton burger et le bouton de recherche (la loupe) */
[data-bs-theme="dark"] .navbar .btn-link {
  color: #e9ecef !important;
}

/* Le bouton utilisateur (connexion) */
[data-bs-theme="dark"] #userMenuButton {
  --bs-btn-color: #e9ecef;
  --bs-btn-border-color: #e9ecef;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #ffe0cc;
  --bs-btn-hover-border-color: #e9ecef;
}

/* --- 2. SIDEBAR : Le bloc des brèves --- */
/* Le fond de la carte des brèves */
[data-bs-theme="dark"] .card-breves {
  background-color: #1a1a1a;
  border: 1px solid #2c2c2c;
}

/* Le titre de la rubrique "Brèves" dans la carte */
[data-bs-theme="dark"] .card-breves .h5,
[data-bs-theme="dark"] .card-breves .h5 a {
  color: #e9ecef !important;
}

/* Les dates des brèves (on garde l'orange, c'est bien) */
[data-bs-theme="dark"] .breve-date {
  color: var(--funky-orange) !important;
}

/* Les titres des brèves */
[data-bs-theme="dark"] .breve-titre a {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .breve-titre a:hover {
  color: var(--funky-orange) !important;
}

/* L'introduction des brèves (le petit texte) */
[data-bs-theme="dark"] .breve-intro {
  color: #adb5bd !important;
}

/* Le séparateur entre les brèves */
[data-bs-theme="dark"] .breve-item {
  border-bottom-color: #2c2c2c !important;
}

/* --- 3. SIDEBAR : Le bloc recherche --- */
[data-bs-theme="dark"] .card-divers {
  background-color: #1a1a1a;
  border: 1px solid #2c2c2c;
}

[data-bs-theme="dark"] .card-divers .h5 {
  color: #e9ecef !important;
}

[data-bs-theme="dark"] .card-divers .formulaire_recherche input {
  background-color: #2c2c2c !important;
  border-color: #495057 !important;
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .card-divers .formulaire_recherche input:focus {
  background-color: #2c2c2c !important;
  border-color: var(--funky-orange-light) !important;
}

/* --- 4. L'offcanvas (menu mobile) --- */
[data-bs-theme="dark"] .offcanvas {
  background-color: #1a1a1a;
  color: #e9ecef;
}
[data-bs-theme="dark"] .offcanvas-header {
  border-bottom-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .offcanvas-body .nav-link {
  color: #e9ecef;
}
[data-bs-theme="dark"] .offcanvas-body .dropdown-menu {
  background-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .offcanvas-body .dropdown-item {
  color: #e9ecef;
}

/* ============================================
   MODE SOMBRE : Formulaire et Forum
   ============================================ */

/* --- 1. Le titre "Réagir à cet article" et le bouton "Laisser un commentaire" --- */
[data-bs-theme="dark"] .forum-reaction h2,
[data-bs-theme="dark"] .forum-reaction .h5 {
  color: #e9ecef !important;
}

/* Le bouton "Laisser un commentaire" (qui utilise btn-outline-dark) */
[data-bs-theme="dark"] .forum-reaction .btn-outline-dark {
  border-color: #e9ecef !important;
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .forum-reaction .btn-outline-dark:hover {
  background-color: #e9ecef !important;
  color: #121212 !important;
}

/* --- 2. Le formulaire de commentaire (card-forum-discret) --- */
[data-bs-theme="dark"] .card-forum-discret {
  background-color: #1a1a1a !important;
  border-left-color: var(--funky-orange) !important;
}

/* Les champs de saisie (Nom, Email, Message) */
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip input,
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip textarea {
  background-color: #2c2c2c !important;
  border-color: #495057 !important;
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip input:focus,
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip textarea:focus {
  background-color: #2c2c2c !important;
  border-color: var(--funky-orange-light) !important;
}

/* Le texte d'aide "Pour créer des paragraphes..." */
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip p.text-info {
  color: #adb5bd !important;
}
[data-bs-theme="dark"] .formulaire-forum-wrapper .formulaire_spip p.text-info a {
  color: #e9ecef !important;
}

/* --- 3. Dans le forum : "répond au message #xxx" --- */
[data-bs-theme="dark"] .forum-footer .reponda,
[data-bs-theme="dark"] .forum-footer .reponda a {
  color: #e9ecef !important; /* Le numéro devient clair */
  text-decoration-color: #e9ecef !important;
}
[data-bs-theme="dark"] .forum-footer .reponda a:hover {
  color: var(--funky-orange) !important;
}

/* --- 4. Le bouton "Répondre à ce message" dans les bulles --- */
[data-bs-theme="dark"] .forum-footer a.btn-outline-secondary {
  border-color: #e9ecef !important;
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .forum-footer a.btn-outline-secondary:hover {
  background-color: transparent !important;
  border-color: var(--funky-orange) !important;
  color: var(--funky-orange) !important;
  box-shadow: 2px 2px 0 var(--funky-orange); /* Ombre orange pour le pop */
}

/* --- 5. Le nom de l'auteur et la date dans les bulles (au cas où) --- */
[data-bs-theme="dark"] .forum-auteur {
  color: var(--funky-orange) !important; /* On garde l'orange, c'est bien */
}
[data-bs-theme="dark"] .forum-date {
  color: #adb5bd !important;
}

/* ============================================
   MODE SOMBRE : Encart PS
   ============================================ */

[data-bs-theme="dark"] .article-ps {
  /* Fond légèrement plus clair que le fond général, pour détacher le bloc */
  background-color: #2c2c2c !important;
  
  /* La bordure orange reste, c'est la signature */
  border-left-color: var(--funky-orange) !important;
  
  /* Texte clair pour la lisibilité */
  color: #e9ecef !important;
}

/* Le titre "PS" (h2) à l'intérieur du bloc */
[data-bs-theme="dark"] .article-ps h2 {
  color: #ffffff !important;
}

/* Les liens éventuels dans le PS */
[data-bs-theme="dark"] .article-ps a {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .article-ps a:hover {
  color: var(--funky-orange-light) !important;
}

/* Le texte en italique (si vous en avez) */
[data-bs-theme="dark"] .article-ps em,
[data-bs-theme="dark"] .article-ps i {
  color: #ced4da !important;
}

/* ============================================
   MODE SOMBRE : Offcanvas (Menu mobile)
   ============================================ */

/* Le fond de l'offcanvas en sombre */
[data-bs-theme="dark"] .offcanvas {
  background-color: #1a1a1a !important;
  color: #e9ecef !important; /* Force la couleur du texte (et donc currentColor) */
}

/* L'en-tête de l'offcanvas */
[data-bs-theme="dark"] .offcanvas-header {
  border-bottom-color: #2c2c2c !important;
}

/* Le logo dans l'offcanvas : on s'assure que currentColor prend bien la couleur claire */
[data-bs-theme="dark"] .offcanvas-header .navbar-brand {
  color: #e9ecef !important;
}

/* Les liens du menu mobile */
[data-bs-theme="dark"] .offcanvas-body .nav-link {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .offcanvas-body .nav-link:hover,
[data-bs-theme="dark"] .offcanvas-body .nav-link:focus {
  color: var(--funky-orange) !important;
}

/* Les dropdowns dans l'offcanvas */
[data-bs-theme="dark"] .offcanvas-body .dropdown-menu {
  background-color: #2c2c2c !important;
  border-left-color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .offcanvas-body .dropdown-item {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .offcanvas-body .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--funky-orange) !important;
}

/* ============================================
   PAGE RECHERCHE
   ============================================ */

/* Les liens de la recherche (articles, rubriques, mots-clés, brèves, forums) */
.recherche-articles a,
.recherche-rubriques a,
.recherche-mots a,
.recherche-breves a,
.recherche-forums a {
  color: var(--funky-text) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}
.recherche-articles a:hover,
.recherche-rubriques a:hover,
.recherche-mots a:hover,
.recherche-breves a:hover,
.recherche-forums a:hover {
  color: var(--funky-orange) !important;
  text-decoration: underline;
}

/* Les dates en gris */
.recherche-breves .text-body-secondary,
.recherche-forums .text-body-secondary {
  font-size: 0.85rem;
}

/* Le cartouche (titre des résultats) */
.article-header .article-surtitre {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--funky-orange);
  margin-bottom: 0.5rem;
}

.article-header .article-titre {
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--funky-black);
  margin-bottom: 1rem;
}

/* Pagination */
.recherche-articles .pagination,
.recherche-rubriques .pagination,
.recherche-mots .pagination,
.recherche-breves .pagination,
.recherche-forums .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding-left: 0;
  list-style: none;
}

.recherche-articles .pagination a,
.recherche-rubriques .pagination a,
.recherche-mots .pagination a,
.recherche-breves .pagination a,
.recherche-forums .pagination a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 50px;
  border: 1px solid #dee2e6;
  color: var(--funky-text) !important;
  text-decoration: none;
  transition: all 0.2s ease;
}

.recherche-articles .pagination a:hover,
.recherche-rubriques .pagination a:hover,
.recherche-mots .pagination a:hover,
.recherche-breves .pagination a:hover,
.recherche-forums .pagination a:hover {
  background-color: var(--funky-orange) !important;
  border-color: var(--funky-orange) !important;
  color: #fff !important;
}

/* Mode sombre */
[data-bs-theme="dark"] .article-header .article-titre {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .recherche-articles a,
[data-bs-theme="dark"] .recherche-rubriques a,
[data-bs-theme="dark"] .recherche-mots a,
[data-bs-theme="dark"] .recherche-breves a,
[data-bs-theme="dark"] .recherche-forums a {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .recherche-articles a:hover,
[data-bs-theme="dark"] .recherche-rubriques a:hover,
[data-bs-theme="dark"] .recherche-mots a:hover,
[data-bs-theme="dark"] .recherche-breves a:hover,
[data-bs-theme="dark"] .recherche-forums a:hover {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .recherche-articles .pagination a,
[data-bs-theme="dark"] .recherche-rubriques .pagination a,
[data-bs-theme="dark"] .recherche-mots .pagination a,
[data-bs-theme="dark"] .recherche-breves .pagination a,
[data-bs-theme="dark"] .recherche-forums .pagination a {
  border-color: #495057;
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .recherche-articles .pagination a:hover,
[data-bs-theme="dark"] .recherche-rubriques .pagination a:hover,
[data-bs-theme="dark"] .recherche-mots .pagination a:hover,
[data-bs-theme="dark"] .recherche-breves .pagination a:hover,
[data-bs-theme="dark"] .recherche-forums .pagination a:hover {
  background-color: var(--funky-orange) !important;
  border-color: var(--funky-orange) !important;
  color: #fff !important;
}

/* ============================================
   SIDEBAR : Bloc Édito (mis en valeur)
   ============================================ */

.card-edito {
  border-top: 4px solid var(--funky-orange) !important;
  border-radius: 0 0 8px 8px;
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Bandeau coloré en haut (plus visible que la bordure seule) */
.card-edito::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--funky-orange), var(--funky-orange-dark));
}

/* Le titre "ÉDITORIAL..." */
.card-edito .h6 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--funky-orange) !important;
  font-weight: 800;
}

/* Le titre de l'édito */
.card-edito .h4 {
  font-size: clamp(1.3rem, 2.5vw + 0.5rem, 1.8rem); /* Taille modérée */
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.card-edito .h4 a {
  color: var(--funky-black) !important;
  transition: color 0.2s ease;
}
.card-edito .h4 a:hover {
  color: var(--funky-orange) !important;
}

/* Les métadonnées (date, auteur) */
/*
.card-edito .text-body-secondary {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--funky-orange) !important; 
}
*/

/* L'introduction */
.edito-intro {
  font-size: clamp(0.85rem, 1vw + 0.4rem, 1rem);
  line-height: 1.6;
  color: var(--funky-secondary);
  /*
  font-style: italic; */ /* Italique pour distinguer l'intro de l'édito */
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #dee2e6;
}

/* Mode sombre */
[data-bs-theme="dark"] .card-edito {
  background-color: #1a1a1a;
  border-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .card-edito .h4 a {
  color: #ffffff !important;
}
[data-bs-theme="dark"] .card-edito .h4 a:hover {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .card-edito .h6 {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .card-edito .text-body-secondary {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .edito-intro {
  color: #adb5bd !important;
  border-top-color: #495057;
}

/* ============================================
   SIDEBAR : Derniers messages (Style Compact)
   ============================================ */

.card-derniers-messages {
  border-top: 4px solid var(--funky-orange) !important;
  border-radius: 0 0 8px 8px;
  background-color: #ffffff;
}

/* Conteneur en ligne */
.derniers-messages-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem; /* Espacement vertical et horizontal */
  line-height: 1.3;
}

.derniers-messages-inline .dernier-message-item {
  display: inline-flex;
  align-items: center;
  font-size: 1rem; /* 16px */
  line-height: 1.4;
}

/* Le lien du message */
.derniers-messages-inline .dernier-message-item a {
  color: var(--funky-text);
  transition: color 0.2s;
}
.derniers-messages-inline .dernier-message-item a:hover {
  color: var(--funky-orange);
}

/* Le séparateur entre les messages */
.derniers-messages-inline .dernier-message-item:not(:last-child)::after {
  content: "•";
  color: var(--funky-orange);
  margin-left: 0.5rem;
  font-weight: bold;
}

.derniers-messages-inline .dernier-message-item .text-body-secondary {
  font-size: 0.85rem; /* La date et l'auteur restent discrets */
}

/* Mode sombre */
[data-bs-theme="dark"] .card-derniers-messages {
  background-color: #1a1a1a !important;
  border-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .derniers-messages-inline .dernier-message-item a {
  color: #e9ecef !important;
}
[data-bs-theme="dark"] .derniers-messages-inline .dernier-message-item a:hover {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .derniers-messages-inline .dernier-message-item .text-body-secondary {
  color: #adb5bd !important;
}

/* ============================================================
   SOMMAIRE
   Ordre du fichier : cartes → mode sombre → anciennes classes (legacy)
   → hero → images/cartes avec image en fond → grille des 3 rubriques
   → liens et survols → titres de rubriques → « Dans la même rubrique »
   ============================================================ */

/* ============================================
   SOMMAIRE : Cartes d'articles
   ============================================ */

/* Carte "À la une" (ancien gabarit) */
.une-card {
  border-top: 6px solid var(--funky-orange) !important;
  border-radius: 0 0 12px 12px;
}
.une-titre {
  font-size: clamp(1.8rem, 4vw + 0.5rem, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.une-titre a {
  color: var(--funky-black);
  text-decoration: none;
}
.une-titre a:hover {
  color: var(--funky-orange);
}
.une-intro {
  font-size: clamp(1rem, 1.5vw + 0.3rem, 1.15rem);
  line-height: 1.6;
  color: var(--funky-secondary);
}
.une-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Cartes secondaires */
.rubrique-card,
.article-card {
  border-top: 3px solid var(--funky-orange) !important;
  border-radius: 0 0 8px 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rubrique-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.1) !important;
}

/* Titres des cartes */
.rubrique-card .h4,
.article-card .h5,
.article-card .h6 {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.rubrique-card .h4 a,
.article-card .h5 a,
.article-card .h6 a {
  color: var(--funky-black);
  text-decoration: none;
  transition: color 0.2s;
}
.rubrique-card .h4 a:hover,
.article-card .h5 a:hover,
.article-card .h6 a:hover {
  color: var(--funky-orange);
}

/* Métadonnées */
.article-meta {
  font-size: 0.8rem;
  color: var(--funky-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.article-meta .meta-sep {
  color: var(--bs-border-color);
}

/* Introduction */
.article-intro {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--funky-secondary);
}

/* Images des cartes */
.rubrique-image img,
.article-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* Liens "Consulter également" */
.list-unstyled li a {
  transition: color 0.2s;
}
.list-unstyled li a:hover {
  color: var(--funky-orange) !important;
}

/* Bandeau "À la une" */
.text-orange {
  color: var(--funky-orange) !important;
}

/* ============================================
   MODE SOMBRE : Cartes du sommaire
   ============================================ */
[data-bs-theme="dark"] .une-card,
[data-bs-theme="dark"] .rubrique-card,
[data-bs-theme="dark"] .article-card {
  background-color: #1a1a1a !important;
  border-color: #2c2c2c !important;
}
[data-bs-theme="dark"] .une-titre a,
[data-bs-theme="dark"] .rubrique-card .h4 a,
[data-bs-theme="dark"] .article-card .h5 a,
[data-bs-theme="dark"] .article-card .h6 a {
  color: #ffffff !important;
}
[data-bs-theme="dark"] .une-titre a:hover,
[data-bs-theme="dark"] .rubrique-card .h4 a:hover,
[data-bs-theme="dark"] .article-card .h5 a:hover,
[data-bs-theme="dark"] .article-card .h6 a:hover {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .une-intro,
[data-bs-theme="dark"] .article-intro {
  color: #adb5bd !important;
}
[data-bs-theme="dark"] .article-meta {
  color: #6c757d !important;
}

/* ============================================
   ANCIENS FALLBACKS (.placeholder-image) — LEGACY
   Plus utilisés par inc-main-sommaire_70.html (remplacés par
   .card-image-overlay + .fallback-default). À supprimer si aucun
   autre gabarit ne les emploie.
   ============================================ */

/* Bloc coloré générique (dégradé à teinte aléatoire) */
.placeholder-image {
  background: linear-gradient(
    135deg,
    hsl(var(--random-hue, 30), 80%, 55%) 0%,
    hsl(var(--random-hue, 30), 80%, 40%) 100%
  ) !important;
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-height: 250px;
}

/* Version pour les petites cartes (grilles) */
.placeholder-image.placeholder-small {
  min-height: 150px;
  height: auto;
  padding: 1rem;
}
.placeholder-image.placeholder-small .placeholder-title {
  font-size: 1.1rem;
}

/* Couleurs fixes par rubrique */
.placeholder-image.fallback-default {
  background: linear-gradient(135deg, var(--funky-orange) 0%, var(--funky-orange-dark) 100%) !important;
}
.placeholder-image.fallback-bourges {
  background: linear-gradient(135deg, #ff8533 0%, #e65c00 100%) !important;
}
.placeholder-image.fallback-societe {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}
.placeholder-image.fallback-culture {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%) !important;
}
.placeholder-image.fallback-medias {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

/* La date (affichée seulement dans la grande Une) */
.placeholder-date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Le titre (dans tous les fallbacks) */
.placeholder-title {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Texte lisible sur toutes les couleurs */
.placeholder-image .placeholder-title {
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4) !important;
}

/* Les colonnes de la Une ont la même hauteur */
.une-card .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* ============================================
   SOMMAIRE : Article à la une (Hero)
   ============================================ */

.hero-une {
  position: relative;   /* contient le lien .card-link-overlay */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
  cursor: pointer;
}

/* Image de fond (ancien gabarit) */
.hero-image {
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Colonne image */
.hero-image-wrapper {
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
  border-radius: 0;
}
.hero-image-wrapper .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Sans photo : dégradé orange + texte blanc.
   Le conteneur sert de "container query" (unités cqw du titre). */
.hero-placeholder {
  background: linear-gradient(135deg, var(--funky-orange) 0%, var(--funky-orange-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  color: #fff;
}
.hero-image-wrapper.hero-placeholder {
  container-type: inline-size;
}
.hero-placeholder .hero-placeholder-content {
  max-width: 36rem;
}
.hero-placeholder .hero-placeholder-surtitre {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}
.hero-placeholder-date {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.hero-placeholder .hero-placeholder-title {
  font-size: clamp(1.6rem, 5.5cqw + 0.5rem, 2.9rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4) !important;
  /* sécurité : jamais plus de 6 lignes */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}
.hero-placeholder .hero-placeholder-title a {
  color: #fff !important;
}
.hero-placeholder .hero-placeholder-meta {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
}

/* Avec photo : contenu texte */
.hero-content {
  background-color: #fff;
  padding: 2.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-titre {
  font-size: clamp(1.8rem, 3.5vw + 0.5rem, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.hero-titre a {
  color: var(--funky-black);
}
.hero-titre a:hover {
  color: var(--funky-orange);
}
.hero-meta {
  font-size: 0.85rem;
  color: var(--funky-muted);
  margin-bottom: 1.25rem;
}
.hero-intro {
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.15rem);
  line-height: 1.6;
  color: var(--funky-secondary);
}

/* Mode sombre */
[data-bs-theme="dark"] .hero-content {
  background-color: #1a1a1a;
}
[data-bs-theme="dark"] .hero-titre a {
  color: #ffffff !important;
}
[data-bs-theme="dark"] .hero-titre a:hover {
  color: var(--funky-orange) !important;
}
[data-bs-theme="dark"] .hero-meta,
[data-bs-theme="dark"] .hero-intro {
  color: #adb5bd !important;
}

/* Mobile : textes du hero sans photo plus grands */
@media (max-width: 767.98px) {
  .hero-placeholder .hero-placeholder-surtitre {
    font-size: 0.8rem;
  }
  .hero-placeholder .hero-placeholder-title {
    font-size: clamp(2rem, 8vw + 0.4rem, 2.8rem);
  }
  .hero-placeholder .hero-placeholder-meta {
    font-size: 0.95rem;
  }
}

/* ============================================
   SOMMAIRE : Cartes avec image en fond + texte superposé
   (un seul wrapper pour toutes les cartes ; 220 px, 300 px pour la
   grande carte de rubrique)
   ============================================ */

.card-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 220px !important;
  min-height: 220px !important;
  max-height: 220px !important;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 8px;
  background-color: #f8f9fa;
}
.rubrique-card .card-image-wrapper.card-image-overlay {
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
}
.rubrique-col .card-image-wrapper {
  flex-shrink: 0;
}

/* Image <img> à l'intérieur du wrapper */
.card-image-wrapper img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Ancien fallback dans un wrapper (legacy) */
.card-image-wrapper.placeholder-image {
  display: flex;
  padding: 1rem;
}
/* Dans les 3 colonnes, la teinte aléatoire l'emporte sur .fallback-* (spécificité) */
.rubrique-col .card-image-wrapper.placeholder-image {
  background: linear-gradient(
    135deg,
    hsl(var(--random-hue, 30), 80%, 55%) 0%,
    hsl(var(--random-hue, 30), 80%, 40%) 100%
  ) !important;
}
.card-image-wrapper.placeholder-image .placeholder-title {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

/* Image en fond */
.card-image-wrapper.card-image-overlay {
  background-color: var(--funky-orange);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* À CONSERVER : le wrapper ne participe plus à la largeur minimale de sa
     carte. Sans ça, entre ~992 et ~1100 px, les 3 colonnes (.rubriques-grid)
     s'élargissent selon leur contenu et débordent de la page. */
  container-type: inline-size;

  /* Tailles du titre et de la date : desktop, par contexte */
  --title-size: clamp(1.15rem, 2.2vw + 0.4rem, 1.6rem);
  --meta-size: clamp(0.75rem, 1.2vw + 0.3rem, 0.9rem);
}
:where(.rubrique-card) .card-image-wrapper.card-image-overlay {
  --title-size: clamp(1.3rem, 2.8vw + 0.5rem, 1.9rem);   /* carte large */
}
:where(.rubriques-grid) .card-image-wrapper.card-image-overlay {
  --title-size: clamp(1.05rem, 1.8vw + 0.4rem, 1.4rem);  /* 3 colonnes */
}
:where(.row .col-md-6) .card-image-wrapper.card-image-overlay {
  --title-size: clamp(1.1rem, 2vw + 0.4rem, 1.5rem);     /* grilles de 2 */
}

/* Fallback (pas de photo) : dégradé orange, sans overlay.
   La classe .fallback-default est ajoutée par le gabarit SPIP,
   et le <div class="card-overlay"> n'est alors pas généré. */
.card-image-wrapper.card-image-overlay.fallback-default {
  background-image: linear-gradient(135deg, var(--funky-orange) 0%, var(--funky-orange-dark) 100%);
}

/* L'overlay sombre */
.card-image-wrapper.card-image-overlay .card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

/* Le contenu (titre, date, auteur) AU-DESSUS de l'overlay */
.card-image-wrapper.card-image-overlay .placeholder-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
}

/* Titre : blanc, taille selon --title-size */
.card-image-wrapper.card-image-overlay .placeholder-title {
  font-size: var(--title-size);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  max-width: 34ch;
  /* sécurité : jamais plus de 4 lignes */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.card-image-wrapper.card-image-overlay .placeholder-meta {
  font-size: var(--meta-size);
  letter-spacing: 0.03em;
  opacity: 0.92;
}
.card-image-wrapper.card-image-overlay .placeholder-title,
.card-image-wrapper.card-image-overlay .placeholder-title a,
.card-image-wrapper.card-image-overlay .placeholder-meta,
.card-image-wrapper.card-image-overlay .placeholder-meta a {
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5) !important;
}

/* Mobile : titres et dates plus grands (même valeur dans tous les contextes) */
@media (max-width: 767.98px) {
  .card-image-wrapper.card-image-overlay {
    --title-size: clamp(1.4rem, 5vw + 0.5rem, 1.8rem);
    --meta-size: clamp(0.85rem, 2.5vw + 0.2rem, 1rem);
  }
  .card-image-wrapper.card-image-overlay .placeholder-title {
    line-height: 1.15;
    max-width: 100%;
  }
}

/* ============================================
   SOMMAIRE : Grille des 3 rubriques (hauteurs égales)
   ============================================ */

.rubriques-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .rubriques-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767.98px) {
  .rubriques-grid {
    grid-template-columns: 1fr;
  }
}

/* Chaque colonne est un flex vertical */
.rubrique-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* La carte prend toute la hauteur de la colonne
   (!important pour écraser Bootstrap) */
.rubrique-col > .card {
  flex: 1 1 auto;
  height: 100% !important;
  min-height: 450px !important; /* ← Hauteur minimale : à ajuster */
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  --bs-card-height: auto;
}

/* Le card-body s'étire pour remplir la carte */
.rubrique-col > .card > .card-body {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Le texte peut s'étirer sans être coupé (ancien gabarit) */
.rubrique-col .article-intro {
  flex: 1 1 auto;
}

/* Le pied est poussé en bas */
.rubrique-col .rubrique-footer {
  margin-top: auto !important;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* ============================================
   SOMMAIRE : Carte cliquable + trait animé sous les titres
   ============================================ */

/* Toute la carte est cliquable : un lien transparent recouvre la carte
   (.card est en position: relative). Il est masqué aux lecteurs d'écran,
   le vrai lien reste celui du titre. */
.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}
.article-card,
.article-link-zone {
  cursor: pointer;
}

/* --- Titres sur image / hero sans photo : trait qui se dessine au survol --- */
/*
.card-image-wrapper.card-image-overlay .placeholder-title a,
.hero-placeholder .hero-placeholder-title a {
  text-decoration: none;
  position: relative;
  display: inline;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  padding-bottom: 2px;
  transition: background-size 0.3s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.card-image-wrapper.card-image-overlay .placeholder-title a::after,
.hero-placeholder .hero-placeholder-title a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}
*/

.card-image-wrapper.card-image-overlay .placeholder-title a,
.hero-placeholder .hero-placeholder-title a {
  text-decoration: none;
  display: inline;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  padding-bottom: 2px;
  transition: background-size 0.3s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* ... les :hover inchangés (background-size: 100% 2px) ... */

/* Survol du titre, de la carte entière, ou focus clavier */
.card-image-wrapper.card-image-overlay .placeholder-title a:hover,
.card-image-wrapper.card-image-overlay .placeholder-title a:focus-visible,
.hero-placeholder .hero-placeholder-title a:hover,
.hero-placeholder .hero-placeholder-title a:focus-visible,
.article-card:hover .placeholder-title a,
.article-link-zone:hover .placeholder-title a,
.article-card:has(.placeholder-title a:focus-visible) .placeholder-title a,
.hero-une:hover .hero-placeholder .hero-placeholder-title a,
.hero-une:has(.hero-placeholder-title a:focus-visible) .hero-placeholder-title a {
  background-size: 100% 2px;
}

/*
.card-image-wrapper.card-image-overlay .placeholder-title a:hover::after,
.card-image-wrapper.card-image-overlay .placeholder-title a:focus-visible::after,
.hero-placeholder .hero-placeholder-title a:hover::after,
.hero-placeholder .hero-placeholder-title a:focus-visible::after,
.article-card:hover .placeholder-title a::after,
.article-link-zone:hover .placeholder-title a::after {
  width: 100%;
}
*/

/* --- Titre du hero avec photo --- */
/*
.hero-titre a {
  text-decoration: none;
  position: relative;
  display: inline;
  background-image: linear-gradient(var(--funky-orange), var(--funky-orange));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 3px;
  padding-bottom: 3px;
  transition: background-size 0.3s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero-titre a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 3px;
  background-color: var(--funky-orange);
  transition: width 0.3s ease;
}
.hero-une:hover .hero-titre a,
.hero-une:has(.hero-titre a:focus-visible) .hero-titre a {
  background-size: 100% 3px;
}
.hero-une:hover .hero-titre a::after,
.hero-titre a:focus-visible::after {
  width: 100%;
}
*/

.hero-titre a {
  text-decoration: none;
  display: inline;
  background-image: linear-gradient(var(--funky-orange), var(--funky-orange));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 3px;
  padding-bottom: 2px;
  transition: background-size 0.3s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero-une:hover .hero-titre a,
.hero-une:has(.hero-titre a:focus-visible) .hero-titre a {
  background-size: 100% 3px;
}

/* --- Listes « Dans la même rubrique » : survol discret --- */
.consulter-egalement a {
  background-image: linear-gradient(var(--funky-orange), var(--funky-orange));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
}
.consulter-egalement a:hover {
  background-size: 100% 1px;
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .card-image-wrapper.card-image-overlay .placeholder-title a,
  .hero-placeholder .hero-placeholder-title a,
  .hero-titre a,
  .card-image-wrapper.card-image-overlay .placeholder-title a::after,
  .hero-placeholder .hero-placeholder-title a::after,
  .hero-titre a::after {
    transition: none;
  }
}

/* ============================================
   SOMMAIRE : Titres de rubriques (Bourges, Société, Culture, Médias)
   ============================================ */

.rubrique-card h2.h5,
.rubriques-grid .rubrique-col h2.h5 {
  color: var(--funky-orange) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}
.rubrique-card h2.h5 a,
.rubriques-grid .rubrique-col h2.h5 a {
  color: var(--funky-orange) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}
.rubrique-card h2.h5 a:hover,
.rubriques-grid .rubrique-col h2.h5 a:hover {
  color: var(--funky-orange-dark) !important;
}

/* Mode sombre : orange plus clair pour rester lisible */
[data-bs-theme="dark"] .rubrique-card h2.h5,
[data-bs-theme="dark"] .rubriques-grid .rubrique-col h2.h5,
[data-bs-theme="dark"] .rubrique-card h2.h5 a,
[data-bs-theme="dark"] .rubriques-grid .rubrique-col h2.h5 a {
  color: var(--funky-orange-light) !important;
}

/* ============================================
   SOMMAIRE : Titre « Dans la même rubrique » (consulter_egalement)
   Jaune "surligneur" : mêmes couleurs en desktop, mobile, clair et sombre
   ============================================ */

.consulter-egalement h4.h6 {
  display: inline-block;
  color: #1a1a1a !important;   /* écrase .text-body-secondary */
  background-color: #a3a3a1;
  padding: 0.2rem 0.6rem;
  border-left: 0;
  border-radius: 0.25rem;
  letter-spacing: 0.06em;
}

/* ============================================
   AJOUTS v7.1 - 12/2026
   ============================================ */

/* 1. Titres des cartes sidebar en mode sombre
   (sinon text-dark = noir sur noir) */
[data-bs-theme="dark"] .card-breves .h5,
[data-bs-theme="dark"] .card-breves .h5 a,
[data-bs-theme="dark"] .card-divers .h5,
[data-bs-theme="dark"] .card-divers .h5 a,
[data-bs-theme="dark"] .card-derniers-messages .h6,
[data-bs-theme="dark"] .card-edito .h6 {
  color: #e9ecef !important;
}

/* 2. Logo centré de la navbar (défini nulle part ailleurs :
   navbar-magazine.css ne contient pas cette classe) */
@media (min-width: 768px) {
  .navbar-brand-centered {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 3. Bouton de bascule de thème : couleur héritée du body
   (text-dark / text-light sont gérés en JS par inc-footer-js_70) */
.theme-toggle {
  color: var(--bs-body-color);
}

/* Titre "À la une" du hero : même rendu que les titres de rubriques */
.hero-rubrique-title {
  color: var(--funky-orange) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}
/* Sur fond orange (placeholder), on force en blanc pour la lisibilité */
.hero-placeholder .hero-rubrique-title {
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4) !important;
}

/* Auteurs en orange du site (partout) */
.auteur-orange,
.placeholder-meta .auteur-orange,
.hero-meta .auteur-orange,
.hero-placeholder-meta .auteur-orange {
  color: var(--funky-orange) !important;
  text-shadow: none !important;
}

.card-image-wrapper.card-image-overlay .placeholder-meta .auteur-orange {
  color: var(--funky-orange-light) !important;
}
.card-image-wrapper.card-image-overlay.fallback-default .placeholder-meta .auteur-orange {
  color: #ffffff !important;
}

/* Édito : date en noir, pas en majuscules */
.card-edito .edito-meta {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.card-edito .edito-date {
  color: var(--bs-body-color) !important;
  text-transform: none !important;
  font-weight: 500;
}
.card-edito .edito-auteur {
  color: var(--funky-orange) !important;
  text-transform: uppercase !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ============================================
   v7.4 - 12/2026 - Brèves et édito (mobile inclus)
   ============================================ */

/* --- Brèves --- */
.breve-titre.h6 {
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.15rem) !important;
  line-height: 1.3;
}
.breve-intro {
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1rem);
  line-height: 1.5;
}
.breve-date {
  font-size: clamp(0.8rem, 1vw + 0.3rem, 0.85rem);
}

/* --- Édito --- */
.card-edito .h4 {
  font-size: clamp(1.5rem, 2.5vw + 0.75rem, 2rem);
  line-height: 1.25;
}
.card-edito .edito-meta {
  font-size: clamp(0.8rem, 1vw + 0.3rem, 0.85rem);
}
.edito-intro {
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.05rem);
  line-height: 1.6;
  font-style: normal;
  color: var(--funky-secondary);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #dee2e6;
}

/* Footer : titres calqués sur le logo (police, épaisseur, letter-spacing, 1ʳᵉ lettre orange) */
.footer-title {
  font-family: 'Ubuntu', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;              /* même graisse que le logo */
  font-size: 1.1rem;             /* taille modérée (le logo fait 42px sur 60 de haut, donc ~1.4rem visuel) */
  letter-spacing: -0.5px;        /* même esprit que -1.5 du logo, mais moins agressif pour du petit texte */
  color: var(--bs-body-color);
  text-transform: none !important; /* pas de majuscules forcées */
  text-decoration: underline;
  text-decoration-color: var(--funky-orange);
}
.footer-title::first-letter {
  color: var(--funky-orange);
}

/* Auteurs : couleur unifiée, casse respectée */
.placeholder-meta,
.hero-meta,
.hero-placeholder-meta {
  text-transform: none; /* pas de majuscules forcées */
}
.placeholder-meta .auteur-orange,
.hero-meta .auteur-orange,
.hero-placeholder-meta .auteur-orange {
  color: var(--funky-orange) !important;
  text-transform: none !important;
  font-weight: 600;
}

/* Derniers messages : flux inline, césure autorisée, clic facile */
.derniers-messages-inline {
  display: block;
  line-height: 1.6;
  font-size: 1rem;
}

.derniers-messages-inline .dernier-message-item {
  display: inline;
  white-space: normal;          /* autorise la césure */
  overflow-wrap: break-word;    /* casse les titres très longs sans espaces */
  word-break: normal;           /* pas de break-all agressif */
}

/* Le titre : inline pour qu'il se casse naturellement, zone cliquable = le texte */
.derniers-messages-inline .dernier-message-item a {
  color: var(--funky-text);
  text-decoration: none;
  transition: color 0.2s;
  /* pas de display: inline-block → le lien peut se casser sur plusieurs lignes */
  /* la zone cliquable reste le texte lui-même */
}
.derniers-messages-inline .dernier-message-item a:hover {
  color: var(--funky-orange);
}

/* Auteur et date : inline, discrets */
.derniers-messages-inline .dernier-message-item .text-body-secondary {
  font-size: 0.85rem;
  white-space: normal;          /* autorise la césure entre "de" et le nom */
}

/* Séparateur • entre messages (pas après le dernier) */
.derniers-messages-inline .dernier-message-item:not(:last-child)::after {
  content: "•";
  color: var(--funky-orange);
  margin-left: 0.5rem;
  margin-right: 0.25rem;
  font-weight: bold;
  /* pas de white-space: nowrap → le • peut passer à la ligne avec le message suivant */
}