/*
Theme Name: DÉCODAGE V4.23 — Performance
Theme URI: https://decodage.edu-vd.ch/
Description: Thème enfant DÉCODAGE basé sur Neve. Habillage commun du moyen d'enseignement, sans déplacer les contenus pédagogiques Gutenberg/AAB.
Author: DÉCODAGE / DGEO Vaud
Template: neve
Version: 4.23.0
Text Domain: decodage
*/

/* ==========================================================
   DÉCODAGE — CHARTE GLOBALE
   Modifier ici uniquement si l'on veut changer la charte
   de tout le site d'un seul coup.
   ========================================================== */

:root{
  --dec-navy:#0d2354;
  --dec-text:#243451;
  --dec-muted:#66718a;
  --dec-green:#16924f;

  --dec-12:#5b477f;
  --dec-34:#9789c3;
  --dec-56:#42aa2d;
  --dec-78:#91c973;

  --dec-border:#dce4ef;
  --dec-soft:#f6f9fd;
  --dec-header-height:88px;
  --dec-content:1500px;
}

/* Base */
html{scroll-behavior:smooth;}
body{
  color:var(--dec-text);
  background:#fff;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body,
button,
input,
select,
textarea{
  font-family:Arial, Helvetica, sans-serif;
}
a{color:inherit;}
.wrapper{min-height:100vh;}
.neve-main{background:#fff;}

/* ==========================================================
   HEADER DÉCODAGE
   ========================================================== */

.decodage-site-header{
  position:relative;
  z-index:1000;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid #e9edf3;
}

.decodage-header-inner{
  width:min(var(--dec-content), calc(100% - 64px));
  min-height:var(--dec-header-height);
  margin:0 auto;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:34px;
}

.decodage-brand{
  display:inline-flex;
  flex-direction:column;
  justify-content:center;
  min-width:max-content;
  text-decoration:none !important;
  line-height:1;
}

.decodage-brand-main{
  display:block;
  color:var(--dec-navy);
  font-size:29px;
  font-weight:800;
  letter-spacing:-.055em;
  white-space:nowrap;
}

.decodage-brand-main .decodage-mark{
  color:var(--dec-green);
}

.decodage-brand-sub{
  display:block;
  margin-top:5px;
  padding-left:3px;
  color:var(--dec-navy);
  font-size:11px;
  font-weight:500;
  letter-spacing:.145em;
  white-space:nowrap;
}

.decodage-primary-nav{
  justify-self:center;
}

.decodage-primary-nav ul{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:31px;
  margin:0;
  padding:0;
  list-style:none;
}

.decodage-primary-nav a{
  position:relative;
  display:block;
  padding:31px 0 28px;
  color:var(--dec-navy);
  font-size:14px;
  font-weight:700;
  text-decoration:none !important;
  white-space:nowrap;
}

.decodage-primary-nav a::after{
  content:"";
  position:absolute;
  right:0;
  bottom:20px;
  left:0;
  height:2px;
  border-radius:2px;
  background:var(--dec-green);
  transform:scaleX(0);
  transform-origin:center;
  transition:transform .18s ease;
}

.decodage-primary-nav a:hover::after,
.decodage-primary-nav .current-menu-item > a::after,
.decodage-primary-nav .current_page_item > a::after,
.decodage-primary-nav a[aria-current="page"]::after{
  transform:scaleX(1);
}

.decodage-primary-nav .current-menu-item > a,
.decodage-primary-nav .current_page_item > a,
.decodage-primary-nav a[aria-current="page"]{
  color:var(--dec-green);
}

.decodage-search{
  position:relative;
  width:215px;
}

.decodage-search input[type="search"]{
  width:100%;
  height:42px;
  margin:0;
  padding:0 42px 0 14px;
  border:1px solid #cfd7e3;
  border-radius:9px;
  outline:none;
  background:#fbfcfe;
  color:var(--dec-text);
  font-size:14px;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

.decodage-search input[type="search"]:focus{
  border-color:#8ea4c5;
  box-shadow:0 0 0 3px rgba(13,35,84,.07);
  background:#fff;
}

.decodage-search button{
  position:absolute;
  top:0;
  right:0;
  width:42px;
  height:42px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--dec-navy);
  cursor:pointer;
}

.decodage-search svg{
  width:19px;
  height:19px;
  vertical-align:middle;
}

/* Mobile menu */
.decodage-mobile-menu{display:none;}
.decodage-mobile-menu summary{
  list-style:none;
  cursor:pointer;
}
.decodage-mobile-menu summary::-webkit-details-marker{display:none;}

/* Skip link */
.decodage-skip{
  position:absolute;
  z-index:99999;
  top:-80px;
  left:18px;
  padding:10px 14px;
  border-radius:7px;
  background:#fff;
  color:var(--dec-navy);
  box-shadow:0 4px 20px rgba(0,0,0,.15);
}
.decodage-skip:focus{top:12px;}

/* ==========================================================
   FOOTER DÉCODAGE
   ========================================================== */

.decodage-site-footer{
  margin-top:22px;
  border-top:1px solid #e7ebf1;
  background:#f8fafc;
}

.decodage-footer-inner{
  width:min(var(--dec-content), calc(100% - 64px));
  min-height:112px;
  margin:0 auto;
  display:grid;
  grid-template-columns:230px 1fr auto;
  align-items:center;
  gap:32px;
}

.decodage-footer-institution{
  display:flex;
  align-items:center;
  min-width:0;
}

.decodage-footer-institution .custom-logo-link{
  display:block;
}

.decodage-footer-institution .custom-logo{
  width:auto;
  max-width:215px;
  max-height:54px;
  object-fit:contain;
}

.decodage-footer-fallback{
  color:var(--dec-navy);
  font-size:14px;
  font-weight:700;
}

.decodage-footer-nav ul{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:34px;
  margin:0;
  padding:0;
  list-style:none;
}

.decodage-footer-nav a{
  color:var(--dec-text);
  font-size:14px;
  text-decoration:none;
}

.decodage-footer-nav a:hover{
  color:var(--dec-green);
}

.decodage-footer-copy{
  color:var(--dec-muted);
  font-size:13px;
  white-space:nowrap;
}

/* ==========================================================
   PAGES INTERNES — STRUCTURE
   ========================================================== */

body:not(.home) .nv-page-title-wrap,
body:not(.home) .nv-big-title{
  background:linear-gradient(135deg,#f8fbff,#f3f7fd) !important;
  border-bottom:1px solid #e4eaf2;
}

body:not(.home) .nv-page-title-wrap .container,
body:not(.home) .nv-big-title .container{
  padding-top:34px !important;
  padding-bottom:34px !important;
}

body:not(.home) .nv-page-title-wrap h1,
body:not(.home) .nv-big-title h1,
body:not(.home) h1.entry-title{
  color:var(--dec-navy) !important;
  font-weight:800 !important;
  letter-spacing:-.035em;
}

.single-page-container{
  padding-top:32px;
  padding-bottom:42px;
}

/* ==========================================================
   BARRE DE RECHERCHE / FILTRES DÉCODAGE
   On ne change PAS le moteur JavaScript.
   ========================================================== */

#edunum-toolbar{
  margin:0 0 26px !important;
  padding:22px 24px 20px;
  border:1px solid var(--dec-border);
  border-radius:16px;
  background:linear-gradient(135deg,#f8fbff,#fff);
  box-shadow:0 5px 18px rgba(21,39,75,.04);
}

#edunum-search{
  width:100% !important;
  max-width:760px !important;
  height:46px;
  margin:0 0 18px !important;
  padding:0 15px !important;
  border:1px solid #cfd7e3 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:var(--dec-text);
  font-size:15px !important;
  outline:none;
}

#edunum-search:focus{
  border-color:#8298bb !important;
  box-shadow:0 0 0 3px rgba(13,35,84,.065);
}

#edunum-filters{
  display:flex !important;
  gap:26px !important;
  flex-wrap:wrap;
  align-items:flex-start;
}

.edunum-filter-group{
  min-width:210px;
}

.edunum-filter-title{
  margin-bottom:7px !important;
  color:var(--dec-navy);
  font-size:14px;
  font-weight:800 !important;
}

.edunum-chip{
  margin:4px 5px 0 0 !important;
  padding:7px 11px !important;
  border:1px solid #c8d0dc !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--dec-text) !important;
  font-size:13.5px !important;
  font-weight:600;
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}

.edunum-chip:hover{
  border-color:#8798b2 !important;
}

.edunum-chip.active{
  border-color:var(--dec-navy) !important;
  background:var(--dec-navy) !important;
  color:#fff !important;
}

#edunum-result-count{
  margin:13px 0 0 !important;
  color:var(--dec-muted);
  font-size:13.5px !important;
  opacity:1 !important;
}

/* ==========================================================
   ACCORDÉONS — HABILLAGE COMMUN
   Les couleurs de fond définies dans Gutenberg sont conservées.
   ========================================================== */

.wp-block-aab-accordion-block.edunum-item{
  margin-bottom:12px !important;
  overflow:hidden;
  border:1px solid rgba(13,35,84,.10) !important;
  border-radius:12px !important;
  box-shadow:0 3px 12px rgba(21,39,75,.035);
  background:#fff;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_head{
  min-height:58px;
  padding:12px 14px !important;
  border-radius:0 !important;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_title{
  color:#132340;
  font-size:15px;
  font-weight:750;
  line-height:1.35;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_body{
  background:#fff;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component{
  padding:17px 18px 20px;
}

.edunum-meta{
  gap:6px !important;
}

.edunum-badge,
.edunum-action{
  min-height:31px !important;
  padding:0 10px !important;
  border:1px solid rgba(13,35,84,.15) !important;
  border-radius:999px !important;
  font-size:12.5px !important;
  box-shadow:none !important;
}

.edunum-badge{
  background:rgba(255,255,255,.92) !important;
  color:var(--dec-navy) !important;
  font-weight:700;
}

.edunum-cat-short{
  width:36px !important;
  padding:0 !important;
}

.edunum-action{
  background:rgba(255,255,255,.72) !important;
  color:var(--dec-navy) !important;
  font-weight:650;
}

.edunum-action:hover{
  background:#fff !important;
  border-color:rgba(13,35,84,.30) !important;
}

.edunum-badge.notice{
  border-color:#efd272 !important;
  background:#fff5cf !important;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width:1150px){
  .decodage-header-inner{
    width:min(100% - 40px,1050px);
    grid-template-columns:auto 1fr;
  }

  .decodage-primary-nav,
  .decodage-search{
    display:none;
  }

  .decodage-mobile-menu{
    display:block;
    justify-self:end;
    position:relative;
  }

  .decodage-mobile-menu summary{
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 12px;
    border:1px solid #d4dbe5;
    border-radius:8px;
    color:var(--dec-navy);
    background:#fff;
    font-size:14px;
    font-weight:700;
  }

  .decodage-mobile-panel{
    position:absolute;
    top:50px;
    right:0;
    width:min(330px,calc(100vw - 32px));
    padding:14px;
    border:1px solid #dfe5ee;
    border-radius:12px;
    background:#fff;
    box-shadow:0 16px 40px rgba(16,35,73,.16);
  }

  .decodage-mobile-panel ul{
    margin:0 0 13px;
    padding:0;
    list-style:none;
  }

  .decodage-mobile-panel li+li{
    border-top:1px solid #edf0f4;
  }

  .decodage-mobile-panel a{
    display:block;
    padding:11px 7px;
    color:var(--dec-navy);
    font-size:14px;
    font-weight:700;
    text-decoration:none;
  }

  .decodage-mobile-panel .decodage-search{
    display:block;
    width:100%;
  }

  .decodage-footer-inner{
    width:min(100% - 40px,1050px);
    grid-template-columns:1fr;
    gap:17px;
    padding:28px 0;
    text-align:center;
  }

  .decodage-footer-institution,
  .decodage-footer-nav ul{
    justify-content:center;
  }
}

@media (max-width:700px){
  :root{--dec-header-height:72px;}

  .decodage-header-inner{
    width:calc(100% - 28px);
    min-height:72px;
    gap:15px;
  }

  .decodage-brand-main{font-size:24px;}
  .decodage-brand-sub{font-size:9px;letter-spacing:.12em;}

  .decodage-footer-nav ul{
    gap:15px 22px;
    flex-wrap:wrap;
  }

  .single-page-container{
    padding-top:22px;
  }

  #edunum-toolbar{
    padding:17px 16px;
    border-radius:12px;
  }

  #edunum-filters{
    gap:18px !important;
  }

  .edunum-filter-group{
    width:100%;
    min-width:0;
  }

  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component{
    padding:15px 14px 18px;
  }
}


/* ==========================================================
   DÉCODAGE V2 — FINITION "MAQUETTE"
   Couche uniquement visuelle.
   ========================================================== */

body.dec-cycle-12{--dec-cycle:var(--dec-12);}
body.dec-cycle-34{--dec-cycle:var(--dec-34);}
body.dec-cycle-56{--dec-cycle:var(--dec-56);}
body.dec-cycle-78{--dec-cycle:var(--dec-78);}
body:not(.dec-cycle-12):not(.dec-cycle-34):not(.dec-cycle-56):not(.dec-cycle-78){
  --dec-cycle:var(--dec-green);
}

/* Header */
.decodage-header-inner{min-height:82px;}
.decodage-brand-main{font-size:30px;}
.decodage-primary-nav a{padding-top:29px;padding-bottom:27px;}
.decodage-primary-nav a::after{bottom:18px;}
.decodage-search{width:225px;}

/* Réduction du vide avant les contenus internes */
body:not(.home) #content{padding-top:0!important;}
body:not(.home) .single-page-container,
body:not(.home) #content>.container,
body:not(.home) .container.single-page-container{
  padding-top:28px!important;
}
body:not(.home) .nv-single-page-wrap,
body:not(.home) .nv-content-wrap,
body:not(.home) article.page{
  margin-top:0!important;
  padding-top:0!important;
}

/* Titre de collection */
body:not(.home) .nv-page-title-wrap,
body:not(.home) .nv-big-title{
  width:min(1240px,calc(100% - 48px));
  margin:28px auto 0!important;
  overflow:hidden;
  border:1px solid #e1e7f0!important;
  border-left:5px solid var(--dec-cycle)!important;
  border-radius:17px;
  background:linear-gradient(135deg,#f7faff,#fff 74%)!important;
  box-shadow:0 8px 24px rgba(21,39,75,.045);
}
body:not(.home) .nv-page-title-wrap .container,
body:not(.home) .nv-big-title .container{
  width:100%!important;
  max-width:none!important;
  padding:24px 30px 25px!important;
}
body:not(.home) .nv-page-title-wrap h1,
body:not(.home) .nv-big-title h1,
body:not(.home) h1.entry-title{
  margin:0!important;
  color:var(--dec-navy)!important;
  font-size:clamp(31px,3vw,43px)!important;
  font-weight:800!important;
  line-height:1.05!important;
  letter-spacing:-.04em;
}

/* Si le titre visible est un premier H1 Gutenberg */
body:not(.home) .entry-content>h1:first-child,
body:not(.home) .entry-content>.wp-block-heading:first-child{
  margin:0!important;
  padding:22px 28px 23px!important;
  overflow:hidden;
  border:1px solid #e1e7f0;
  border-left:5px solid var(--dec-cycle);
  border-radius:16px 16px 0 0;
  background:linear-gradient(135deg,#f7faff,#fff 74%);
  color:var(--dec-navy);
  font-size:clamp(31px,3vw,43px);
  font-weight:800;
  line-height:1.05;
  letter-spacing:-.04em;
}

/* Filtres */
#edunum-toolbar{
  position:relative;
  margin:0 0 22px!important;
  padding:20px 22px 17px!important;
  border:1px solid #dce4ef!important;
  border-radius:15px!important;
  background:#fbfcfe!important;
  box-shadow:0 7px 22px rgba(21,39,75,.04)!important;
}
#edunum-search{
  width:100%!important;
  max-width:none!important;
  height:45px!important;
  margin:0 0 17px!important;
  padding:0 15px!important;
  border:1px solid #ccd6e4!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--dec-text)!important;
  font-size:15px!important;
}
#edunum-search:focus{
  border-color:var(--dec-cycle)!important;
  box-shadow:0 0 0 3px rgba(13,35,84,.055)!important;
}
#edunum-filters{
  display:grid!important;
  grid-template-columns:minmax(250px,1fr) minmax(360px,1.45fr) minmax(170px,.62fr);
  gap:18px 28px!important;
  align-items:start!important;
}
.edunum-filter-group{min-width:0!important;}
.edunum-filter-title{
  margin:0 0 7px!important;
  color:var(--dec-navy)!important;
  font-size:13.5px!important;
  font-weight:800!important;
}
.edunum-chip{
  min-height:36px;
  margin:3px 5px 3px 0!important;
  padding:0 12px!important;
  border:1px solid #cbd5e2!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--dec-text)!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:34px!important;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,color .14s ease!important;
}
.edunum-chip:hover{
  border-color:var(--dec-cycle)!important;
  transform:translateY(-1px);
}
.edunum-chip.active{
  border-color:var(--dec-cycle)!important;
  background:var(--dec-cycle)!important;
  color:#fff!important;
  box-shadow:0 3px 9px rgba(13,35,84,.08);
}
#edunum-result-count{
  margin:11px 0 0!important;
  color:var(--dec-muted)!important;
  font-size:13px!important;
}

/* Accordéons : couleurs Gutenberg conservées */
.wp-block-aab-accordion-block.edunum-item{
  margin-bottom:11px!important;
  overflow:hidden!important;
  border:1px solid rgba(13,35,84,.075)!important;
  border-radius:13px!important;
  background:#fff;
  box-shadow:0 4px 13px rgba(21,39,75,.035)!important;
  transition:transform .15s ease,box-shadow .15s ease!important;
}
.wp-block-aab-accordion-block.edunum-item:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(21,39,75,.065)!important;
}
.wp-block-aab-accordion-block.edunum-item .aab__accordion_head{
  min-height:59px!important;
  padding:11px 13px!important;
  border-radius:0!important;
}
.wp-block-aab-accordion-block.edunum-item .aab__accordion_title{
  color:#0e214a!important;
  font-size:15.5px!important;
  font-weight:800!important;
  line-height:1.35!important;
}
.wp-block-aab-accordion-block.edunum-item .aab__accordion_body{
  border-top:1px solid rgba(13,35,84,.075);
}
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component{
  padding:19px 19px 22px!important;
}

/* Badges et actions */
.edunum-meta{gap:6px!important;}
.edunum-badge,
.edunum-action{
  min-height:31px!important;
  padding:0 10px!important;
  border:1px solid rgba(13,35,84,.13)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.88)!important;
  color:var(--dec-navy)!important;
  font-size:12.5px!important;
  font-weight:700!important;
  line-height:29px!important;
  box-shadow:0 1px 4px rgba(21,39,75,.025)!important;
}
.edunum-cat-short{
  width:35px!important;
  min-width:35px!important;
  padding:0!important;
  justify-content:center;
}
.edunum-action{
  cursor:pointer;
  transition:background .14s ease,border-color .14s ease,transform .14s ease!important;
}
.edunum-action:hover{
  border-color:var(--dec-cycle)!important;
  background:#fff!important;
  transform:translateY(-1px);
}
.edunum-badge.notice{
  border-color:#edcf69!important;
  background:#fff4c8!important;
  color:#765300!important;
}

.decodage-site-footer{margin-top:38px;}

@media(max-width:1050px){
  #edunum-filters{grid-template-columns:1fr 1fr!important;}
  .edunum-filter-group:last-child{grid-column:1/-1;}
}
@media(max-width:700px){
  body:not(.home) .nv-page-title-wrap,
  body:not(.home) .nv-big-title{
    width:calc(100% - 28px);
    margin-top:17px!important;
    border-radius:13px;
  }
  body:not(.home) .nv-page-title-wrap .container,
  body:not(.home) .nv-big-title .container{
    padding:18px 18px 19px!important;
  }
  body:not(.home) .single-page-container,
  body:not(.home) #content>.container,
  body:not(.home) .container.single-page-container{
    padding-top:17px!important;
  }
  #edunum-toolbar{
    padding:16px 14px 14px!important;
    border-radius:12px!important;
  }
  #edunum-filters{display:block!important;}
  .edunum-filter-group{margin-bottom:15px;}
  .edunum-chip{
    min-height:37px;
    line-height:35px!important;
    font-size:13px!important;
  }
}


/* ==========================================================
   DÉCODAGE V3 — FINITION COSMÉTIQUE
   V2 validée fonctionnellement. Cette couche ne modifie
   aucune donnée pédagogique ni aucun script métier.
   ========================================================== */

/* ---------- HEADER : identité légèrement renforcée ---------- */
.decodage-header-inner{
  min-height:84px;
  gap:38px;
}

.decodage-brand-main{
  font-size:32px;
  letter-spacing:-.058em;
}

.decodage-brand-sub{
  margin-top:6px;
  font-size:10.5px;
  letter-spacing:.14em;
}

.decodage-primary-nav ul{
  gap:29px;
}

.decodage-primary-nav a{
  font-size:14px;
}

.decodage-search{
  width:230px;
}

.decodage-search input[type="search"]{
  height:43px;
  border-radius:10px;
}

/* ---------- ACCUEIL : hero un peu moins haut ---------- */
.home .decodage-hero-inner{
  min-height:610px !important;
  padding-top:38px !important;
  padding-bottom:24px !important;
}

.home .decodage-books-stage{
  min-height:525px !important;
}

.home .decodage-resources{
  padding-top:28px !important;
}

.home .decodage-section-title{
  margin-bottom:19px !important;
}

/* ---------- TITRE DE COLLECTION : aspect plus éditorial ---------- */
body:not(.home) .nv-page-title-wrap,
body:not(.home) .nv-big-title,
body:not(.home) .entry-content>h1:first-child,
body:not(.home) .entry-content>.wp-block-heading:first-child{
  border-top:1px solid #e6ebf2 !important;
  border-right:1px solid #e6ebf2 !important;
  border-bottom:1px solid #e6ebf2 !important;
  border-left:6px solid var(--dec-cycle) !important;
  box-shadow:
    0 10px 30px rgba(21,39,75,.045),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
  background:
    radial-gradient(circle at 96% 15%, rgba(13,35,84,.035), transparent 29%),
    linear-gradient(135deg,#f8fbff 0%,#ffffff 74%) !important;
}

body:not(.home) .nv-page-title-wrap,
body:not(.home) .nv-big-title{
  margin-top:22px !important;
}

body:not(.home) .nv-page-title-wrap .container,
body:not(.home) .nv-big-title .container{
  padding-top:22px !important;
  padding-bottom:23px !important;
}

/* ---------- CONTENU : alignement plus serré avec le titre ---------- */
body:not(.home) .single-page-container,
body:not(.home) #content>.container,
body:not(.home) .container.single-page-container{
  padding-top:18px !important;
}

/* ---------- 7–8 : remarques éditoriales mieux intégrées ----------
   On ne change pas leur contenu ni leur ordre. */
body.dec-cycle-78 .entry-content>p:first-of-type,
body.dec-cycle-78 .entry-content>p:nth-of-type(2){
  max-width:1120px;
  margin-left:auto !important;
  margin-right:auto !important;
  color:#33435f;
  font-size:15px;
  line-height:1.6;
}

body.dec-cycle-78 .entry-content>p:first-of-type{
  position:relative;
  margin-top:4px !important;
  margin-bottom:12px !important;
  padding:13px 17px 13px 42px !important;
  border-left:4px solid var(--dec-cycle);
  border-radius:8px;
  background:#f8fbff;
}

body.dec-cycle-78 .entry-content>p:first-of-type::before{
  content:"i";
  position:absolute;
  top:12px;
  left:15px;
  display:grid;
  width:18px;
  height:18px;
  place-items:center;
  border:1.5px solid var(--dec-cycle);
  border-radius:50%;
  color:var(--dec-cycle);
  font-size:11px;
  font-weight:800;
  font-family:Georgia,serif;
}

body.dec-cycle-78 .entry-content>p:nth-of-type(2){
  margin-top:0 !important;
  margin-bottom:22px !important;
  padding:0 4px !important;
}

/* ---------- FILTRES : finition, sans changer la structure ---------- */
#edunum-toolbar{
  border-radius:16px !important;
  box-shadow:0 8px 26px rgba(21,39,75,.045) !important;
}

#edunum-search{
  border-radius:10px !important;
}

.edunum-chip{
  box-shadow:0 1px 2px rgba(21,39,75,.015);
}

.edunum-chip.active{
  box-shadow:0 4px 11px rgba(13,35,84,.09) !important;
}

/* ---------- ACCORDÉONS : très légère finition ---------- */
.wp-block-aab-accordion-block.edunum-item{
  border-radius:12px !important;
  box-shadow:0 4px 14px rgba(21,39,75,.035) !important;
}

.wp-block-aab-accordion-block.edunum-item:hover{
  transform:translateY(-1px);
  box-shadow:0 9px 22px rgba(21,39,75,.06) !important;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_head{
  min-height:58px !important;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_title{
  letter-spacing:-.005em;
}

/* ---------- FOOTER : respiration ---------- */
.decodage-site-footer{
  margin-top:34px;
}

@media(max-width:1180px){
  .home .decodage-hero-inner{
    min-height:auto !important;
  }
  .home .decodage-books-stage{
    min-height:455px !important;
  }
}

@media(max-width:700px){
  .decodage-header-inner{
    min-height:72px;
  }

  .decodage-brand-main{
    font-size:25px;
  }

  body:not(.home) .nv-page-title-wrap,
  body:not(.home) .nv-big-title{
    margin-top:15px !important;
  }

  body.dec-cycle-78 .entry-content>p:first-of-type{
    padding-left:40px !important;
  }

  body.dec-cycle-78 .entry-content>p:first-of-type,
  body.dec-cycle-78 .entry-content>p:nth-of-type(2){
    font-size:14px;
  }
}


/* ==========================================================
   DÉCODAGE V3.2 — CONTACT + FINITION FINALE
   Présentation uniquement.
   ========================================================== */

/* Contact : largeur et introduction */
body.dec-page-contact .single-page-container,
body.dec-page-contact #content>.container,
body.dec-page-contact .container.single-page-container{
  max-width:1160px !important;
}

body.dec-page-contact .entry-content>p:first-of-type{
  max-width:1050px;
  margin:8px 0 28px !important;
  color:var(--dec-text);
  font-size:18px;
  line-height:1.58;
}

/* WPForms : carte propre, cohérente avec les filtres */
body.dec-page-contact .wpforms-container{
  max-width:1000px !important;
  margin:0 !important;
  padding:25px 27px 27px !important;
  border:1px solid var(--dec-border);
  border-radius:16px;
  background:#fbfcfe;
  box-shadow:0 8px 26px rgba(21,39,75,.045);
}

body.dec-page-contact .wpforms-container .wpforms-field{
  padding:8px 0 12px !important;
}

body.dec-page-contact .wpforms-container .wpforms-field-label{
  margin:0 0 7px !important;
  color:var(--dec-navy) !important;
  font-size:14px !important;
  font-weight:800 !important;
}

body.dec-page-contact .wpforms-container .wpforms-field-sublabel{
  color:var(--dec-muted) !important;
  font-size:12.5px !important;
}

body.dec-page-contact .wpforms-container input[type="text"],
body.dec-page-contact .wpforms-container input[type="email"],
body.dec-page-contact .wpforms-container input[type="tel"],
body.dec-page-contact .wpforms-container input[type="url"],
body.dec-page-contact .wpforms-container input[type="number"],
body.dec-page-contact .wpforms-container select,
body.dec-page-contact .wpforms-container textarea{
  width:100% !important;
  border:1px solid #cbd5e2 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:var(--dec-text) !important;
  font-size:15px !important;
  box-shadow:none !important;
  transition:border-color .15s ease, box-shadow .15s ease !important;
}

body.dec-page-contact .wpforms-container input[type="text"],
body.dec-page-contact .wpforms-container input[type="email"],
body.dec-page-contact .wpforms-container input[type="tel"],
body.dec-page-contact .wpforms-container input[type="url"],
body.dec-page-contact .wpforms-container input[type="number"],
body.dec-page-contact .wpforms-container select{
  min-height:44px !important;
  padding:0 12px !important;
}

body.dec-page-contact .wpforms-container textarea{
  min-height:150px !important;
  padding:11px 12px !important;
}

body.dec-page-contact .wpforms-container input:focus,
body.dec-page-contact .wpforms-container select:focus,
body.dec-page-contact .wpforms-container textarea:focus{
  border-color:var(--dec-green) !important;
  box-shadow:0 0 0 3px rgba(22,146,79,.08) !important;
  outline:none !important;
}

body.dec-page-contact .wpforms-container input[type="checkbox"],
body.dec-page-contact .wpforms-container input[type="radio"]{
  accent-color:var(--dec-green);
}

body.dec-page-contact .wpforms-container .wpforms-field-checkbox li,
body.dec-page-contact .wpforms-container .wpforms-field-radio li{
  margin-bottom:7px !important;
}

body.dec-page-contact .wpforms-container .wpforms-submit-container{
  padding-top:15px !important;
}

body.dec-page-contact .wpforms-container button[type="submit"],
body.dec-page-contact .wpforms-container input[type="submit"]{
  min-height:45px !important;
  padding:0 22px !important;
  border:1px solid var(--dec-green) !important;
  border-radius:9px !important;
  background:var(--dec-green) !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:800 !important;
  box-shadow:none !important;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease !important;
}

body.dec-page-contact .wpforms-container button[type="submit"]:hover,
body.dec-page-contact .wpforms-container input[type="submit"]:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(22,146,79,.16) !important;
}

/* hCaptcha / anti-spam : ne pas forcer sa taille */
body.dec-page-contact .wpforms-container .h-captcha,
body.dec-page-contact .wpforms-container .wpforms-field-hcaptcha{
  overflow:visible !important;
}

/* Mobile contact */
@media(max-width:700px){
  body.dec-page-contact .entry-content>p:first-of-type{
    font-size:16px;
    margin-bottom:20px !important;
  }

  body.dec-page-contact .wpforms-container{
    padding:18px 15px 20px !important;
    border-radius:12px;
  }

  body.dec-page-contact .wpforms-field-row{
    display:block !important;
  }

  body.dec-page-contact .wpforms-field-row-block{
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding:0 !important;
  }
}


/* ==========================================================
   DÉCODAGE V3.3 — AJUSTEMENTS RESPONSIVE
   Correction des espacements intermédiaires tablette/mobile.
   Aucune modification fonctionnelle.
   ========================================================== */

/* Tablette / petit portable : le hero est sur une colonne.
   On supprime la hauteur artificielle qui créait un grand vide
   avant les couvertures. */
@media (max-width:1180px){
  .decodage-inner{
    width:min(100% - 36px,1060px) !important;
  }

  .home .decodage-hero-inner{
    gap:0 !important;
    padding-top:34px !important;
    padding-bottom:20px !important;
  }

  .home .decodage-hero-copy{
    padding-bottom:4px !important;
  }

  .home .decodage-rule{
    margin-top:27px !important;
    margin-bottom:23px !important;
  }

  .home .decodage-benefits{
    margin-top:29px !important;
  }

  .home .decodage-books-stage{
    min-height:0 !important;
    height:auto !important;
    margin-top:18px !important;
    padding-top:12px !important;
    padding-bottom:18px !important;
    align-items:flex-end !important;
  }

  .home .decodage-book{
    max-width:205px !important;
  }
}

/* Largeurs intermédiaires : garder quatre livres en ligne,
   mais compacter légèrement la typographie et les bénéfices. */
@media (min-width:681px) and (max-width:900px){
  .home .decodage-logo-text{
    font-size:clamp(58px,9vw,74px) !important;
  }

  .home .decodage-logo-sub{
    font-size:15px !important;
  }

  .home .decodage-intro{
    max-width:620px !important;
    font-size:20px !important;
    line-height:1.5 !important;
  }

  .home .decodage-benefits{
    max-width:660px !important;
    gap:18px !important;
  }

  .home .decodage-benefit{
    grid-template-columns:50px 1fr !important;
    gap:12px !important;
  }

  .home .decodage-benefit-icon{
    width:50px !important;
    height:50px !important;
    font-size:22px !important;
  }

  .home .decodage-benefit strong{
    font-size:15px !important;
  }

  .home .decodage-benefit span{
    font-size:13.5px !important;
  }

  .home .decodage-books-stage{
    gap:10px !important;
    margin-top:14px !important;
  }

  .home .decodage-book{
    max-width:185px !important;
  }

  .home .decodage-resources{
    padding-top:24px !important;
  }
}

/* Mobile : la grille 2x2 des couvertures doit reprendre sa
   hauteur naturelle, malgré les règles tablette précédentes. */
@media (max-width:680px){
  .decodage-inner{
    width:calc(100% - 28px) !important;
  }

  .home .decodage-hero-inner{
    padding-top:26px !important;
    padding-bottom:20px !important;
  }

  .home .decodage-hero-copy{
    padding-bottom:0 !important;
  }

  .home .decodage-logo-text{
    font-size:clamp(44px,13vw,62px) !important;
  }

  .home .decodage-rule{
    margin-top:23px !important;
    margin-bottom:20px !important;
  }

  .home .decodage-intro{
    font-size:18px !important;
  }

  .home .decodage-benefits{
    margin-top:24px !important;
    gap:15px !important;
  }

  .home .decodage-books-stage{
    min-height:0 !important;
    height:auto !important;
    margin-top:22px !important;
    padding-top:8px !important;
    padding-bottom:8px !important;
  }

  .home .decodage-book{
    max-width:none !important;
  }

  .home .decodage-resources{
    padding-top:24px !important;
  }
}


/* ==========================================================
   DÉCODAGE V3.4 — CONTENU DES ACCORDÉONS
   Finition éditoriale des vrais blocs Gutenberg/AAB.
   Aucun contenu n'est déplacé ni reconstruit.
   ========================================================== */

/* ---------- ACCORDÉON OUVERT ---------- */
.wp-block-aab-accordion-block.edunum-item[aria-expanded="true"]{
  box-shadow:0 12px 30px rgba(21,39,75,.075) !important;
}

.wp-block-aab-accordion-block.edunum-item[aria-expanded="true"] .aab__accordion_head{
  box-shadow:inset 0 -1px 0 rgba(13,35,84,.08);
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_body{
  background:
    linear-gradient(180deg,#fff 0%,#fff 92%,#fbfcfe 100%) !important;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component{
  padding:27px 30px 32px !important;
  color:var(--dec-text);
}

/* Largeur éditoriale des contenus textuels */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > h2,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > h3,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > h4,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > ul,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > ol,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > .wp-block-list{
  width:min(100%,1120px);
  margin-left:auto;
  margin-right:auto;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p{
  margin-top:0;
  margin-bottom:17px;
  font-size:16px;
  line-height:1.62;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p:last-child{
  margin-bottom:0;
}

/* ---------- REMARQUE / ERRATUM ----------
   Le badge ⚠️ existe déjà dans l'en-tête. On utilise uniquement
   sa présence pour habiller le premier texte, sans toucher au
   script de détection du badge. */
.wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
.aab__accordion_component > p:first-child{
  position:relative;
  width:min(100%,1120px);
  margin:0 auto 20px !important;
  padding:16px 18px 16px 53px !important;
  border:1px solid #efd98f;
  border-left:4px solid #e2ac21;
  border-radius:11px;
  background:linear-gradient(135deg,#fffaf0,#fffdf8);
  color:#4b3c12;
  font-size:15.5px !important;
  line-height:1.58 !important;
  box-shadow:0 4px 13px rgba(84,62,0,.035);
}

.wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
.aab__accordion_component > p:first-child::before{
  content:"!";
  position:absolute;
  top:16px;
  left:17px;
  display:grid;
  width:23px;
  height:23px;
  place-items:center;
  border:1.5px solid #d8a21b;
  border-radius:50%;
  color:#9a6c00;
  background:#fff7d6;
  font-size:14px;
  font-weight:900;
  line-height:1;
}

/* Le premier libellé d'un erratum reste clairement identifiable */
.wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
.aab__accordion_component > p:first-child strong:first-child{
  color:#6b4a00;
}

/* ---------- IMAGES / CORRECTIFS ---------- */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > figure.wp-block-image{
  width:fit-content;
  max-width:min(100%,1120px);
  margin:18px auto 24px !important;
  padding:10px;
  overflow:hidden;
  border:1px solid #e1e7ef;
  border-radius:12px;
  background:#fff;
  box-shadow:0 5px 16px rgba(21,39,75,.04);
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > figure.wp-block-image img{
  display:block;
  max-width:100%;
  height:auto;
  margin:0;
  border-radius:6px;
}

/* Petits correctifs/pictogrammes ne flottent plus seuls dans un grand vide */
.wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
.aab__accordion_component > figure.wp-block-image{
  margin-top:4px !important;
  margin-bottom:24px !important;
}

/* ---------- DFLIP / DEARFLIP ----------
   DearFlip utilise notamment .df-container pour l'embedded viewer.
   On ne modifie pas sa mécanique, uniquement son cadre parent. */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component .df-container,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component .df-element,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component ._df_book{
  width:min(100%,1160px) !important;
  max-width:1160px !important;
  margin:25px auto 2px !important;
  overflow:hidden;
  border:1px solid #d8e0ea;
  border-radius:14px;
  background:#eef2f6;
  box-shadow:0 10px 28px rgba(21,39,75,.09);
}

/* Si le shortcode est rendu à l'intérieur d'un paragraphe,
   ce paragraphe devient uniquement le conteneur du lecteur. */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p:has(.df-container),
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p:has(.df-element),
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p:has(._df_book){
  width:100%;
  max-width:none;
  margin:0 !important;
}

/* Chargement DearFlip : discret et cohérent avec le thème */
.wp-block-aab-accordion-block.edunum-item .df-container .df-loading-info{
  color:var(--dec-navy) !important;
  font-family:inherit !important;
}

/* ---------- BLOCS DE RESSOURCES / TÉLÉCHARGEMENTS ---------- */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component a[download]{
  display:inline-flex !important;
  min-height:41px;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 14px !important;
  border:1px solid #bdd0ea !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#174c96 !important;
  font-size:14px !important;
  font-weight:750 !important;
  line-height:1.25 !important;
  text-decoration:none !important;
  box-shadow:0 2px 7px rgba(23,76,150,.04);
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease !important;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component a[download]:hover{
  transform:translateY(-1px);
  border-color:#72a0dc !important;
  box-shadow:0 6px 15px rgba(23,76,150,.09);
}

/* Les blocs HTML pédagogiques existants restent modifiables dans Gutenberg.
   On harmonise uniquement les cartes qui utilisent déjà une bordure latérale. */
.wp-block-aab-accordion-block.edunum-item
.aab__accordion_component > div[style*="border-left"]{
  width:min(100%,1120px);
  margin:18px auto 22px !important;
  border-radius:10px !important;
  box-shadow:0 4px 13px rgba(21,39,75,.035);
}

/* ---------- LISTES / LIENS DANS LE CORPS ---------- */
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component ul,
.wp-block-aab-accordion-block.edunum-item .aab__accordion_component ol{
  padding-left:1.35em;
  color:var(--dec-text);
  font-size:16px;
  line-height:1.62;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component li+li{
  margin-top:6px;
}

.wp-block-aab-accordion-block.edunum-item .aab__accordion_component a:not([download]){
  color:#1557a1;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
}

/* ---------- MOBILE ---------- */
@media(max-width:700px){
  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component{
    padding:20px 15px 23px !important;
  }

  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component > p,
  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component ul,
  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component ol{
    font-size:15px;
    line-height:1.58;
  }

  .wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
  .aab__accordion_component > p:first-child{
    padding:14px 14px 14px 46px !important;
    font-size:14.5px !important;
  }

  .wp-block-aab-accordion-block.edunum-item:has(.edunum-badge.notice)
  .aab__accordion_component > p:first-child::before{
    top:14px;
    left:14px;
    width:21px;
    height:21px;
    font-size:13px;
  }

  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component > figure.wp-block-image{
    margin-top:12px !important;
    margin-bottom:19px !important;
    padding:7px;
    border-radius:10px;
  }

  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component .df-container,
  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component .df-element,
  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component ._df_book{
    margin-top:18px !important;
    border-radius:10px;
  }

  .wp-block-aab-accordion-block.edunum-item .aab__accordion_component a[download]{
    width:100%;
    min-height:44px;
    padding:9px 12px !important;
    white-space:normal;
    text-align:center;
  }
}


/* ==========================================================
   DÉCODAGE V4 — MAQUETTE PÉDAGOGIQUE
   Couche d'interface visuelle ajoutée au moteur stable existant.
   ========================================================== */

body.dec-v4-pedago{
  --dec-panel:#fbfcfe;
  --dec-panel-border:#dce4ef;
}

/* L'ancien H1 reste dans WordPress mais est remplacé visuellement par
   le H1 de la maquette créé par la couche de thème. */
.dec-v4-source-title{
  display:none !important;
}

/* ---------- EN-TÊTE DE COLLECTION ---------- */
.dec-pedago-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,390px);
  gap:42px;
  align-items:start;
  margin:26px 0 34px;
}

.dec-pedago-hero-main{
  min-width:0;
  padding-top:4px;
}

.dec-pedago-hero h1{
  margin:0;
  color:var(--dec-navy);
  font-size:clamp(38px,4vw,56px);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-.045em;
}

.dec-pedago-subtitle{
  max-width:790px;
  margin:12px 0 0;
  color:#4c5870;
  font-size:17px;
  line-height:1.55;
}

.dec-pedago-accent{
  width:98px;
  height:4px;
  margin-top:20px;
  border-radius:999px;
  background:var(--dec-cycle);
}

.dec-pedago-welcome{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:15px;
  align-items:start;
  padding:20px 22px;
  border:1px solid #d9e1ec;
  border-radius:15px;
  background:
    radial-gradient(circle at 90% 10%,rgba(55,103,190,.06),transparent 36%),
    linear-gradient(135deg,#f8fbff,#f4f7fc);
  box-shadow:0 8px 25px rgba(21,39,75,.04);
}

.dec-pedago-welcome-icon{
  display:grid;
  width:38px;
  height:38px;
  place-items:center;
  border:2px solid var(--dec-navy);
  border-radius:50%;
  color:var(--dec-navy);
  font:800 21px/1 Georgia,serif;
}

.dec-pedago-welcome strong{
  display:block;
  margin:1px 0 4px;
  color:var(--dec-navy);
  font-size:16px;
  line-height:1.25;
}

.dec-pedago-welcome span{
  display:block;
  color:#536078;
  font-size:14px;
  line-height:1.5;
}

/* ---------- PANNEAU DE RECHERCHE / FILTRES ---------- */
body.dec-v4-pedago #edunum-toolbar{
  margin:0 !important;
  padding:17px 18px 18px !important;
  border:1px solid var(--dec-panel-border) !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 7px 25px rgba(21,39,75,.035) !important;
}

body.dec-v4-pedago #edunum-search{
  height:52px !important;
  margin:0 0 20px !important;
  padding:0 18px 0 55px !important;
  border:1px solid #cfd8e5 !important;
  border-radius:10px !important;
  background-color:#fff !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 24 24' fill='none' stroke='%230d2354' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:18px center !important;
  color:var(--dec-text) !important;
  font-size:15px !important;
  outline:none !important;
}

body.dec-v4-pedago #edunum-search:focus{
  border-color:#8da4c6 !important;
  box-shadow:0 0 0 3px rgba(13,35,84,.055) !important;
}

body.dec-v4-pedago #edunum-filters{
  display:grid !important;
  grid-template-columns:1.05fr 1.45fr .82fr;
  gap:0 !important;
  align-items:stretch !important;
}

body.dec-v4-pedago .edunum-filter-group{
  min-width:0 !important;
  padding:4px 28px 3px !important;
}

body.dec-v4-pedago .edunum-filter-group:first-child{
  padding-left:0 !important;
}

body.dec-v4-pedago .edunum-filter-group + .edunum-filter-group{
  border-left:1px solid #e2e7ef;
}

body.dec-v4-pedago .edunum-filter-title{
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 10px !important;
  color:var(--dec-navy) !important;
  font-size:14px !important;
  font-weight:800 !important;
}

body.dec-v4-pedago .edunum-filter-title::after{
  content:"i";
  display:grid;
  width:16px;
  height:16px;
  place-items:center;
  border:1px solid #7c8aa1;
  border-radius:50%;
  color:#627089;
  font:700 10px/1 Georgia,serif;
}

body.dec-v4-pedago .edunum-chip{
  min-height:36px;
  margin:3px 8px 3px 0 !important;
  padding:0 15px !important;
  border:1px solid #d2dae5 !important;
  border-radius:999px !important;
  background:#fff !important;
  color:#4b5870 !important;
  font-size:13px !important;
  font-weight:650 !important;
  line-height:34px !important;
  box-shadow:none !important;
  transform:none !important;
}

body.dec-v4-pedago .edunum-chip:hover{
  border-color:#9cacbf !important;
  color:var(--dec-navy) !important;
}

body.dec-v4-pedago .edunum-chip.active{
  border-color:var(--dec-navy) !important;
  background:var(--dec-navy) !important;
  color:#fff !important;
  box-shadow:0 4px 10px rgba(13,35,84,.09) !important;
}

/* Le compteur est déplacé visuellement sous le panneau, sans changer
   l'élément que le moteur stable met à jour. */
.dec-results-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:50px;
  padding:11px 2px 7px;
}

.dec-results-count-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  color:var(--dec-navy);
}

.dec-results-list-icon{
  position:relative;
  width:23px;
  height:20px;
  flex:0 0 23px;
}

.dec-results-list-icon::before,
.dec-results-list-icon::after{
  content:"";
  position:absolute;
  left:7px;
  width:15px;
  height:2px;
  border-radius:2px;
  background:var(--dec-navy);
  box-shadow:0 7px 0 var(--dec-navy),0 14px 0 var(--dec-navy);
}

.dec-results-list-icon::before{
  top:2px;
}

.dec-results-list-icon::after{
  left:0;
  top:2px;
  width:3px;
  height:3px;
  border-radius:50%;
  box-shadow:0 7px 0 var(--dec-navy),0 14px 0 var(--dec-navy);
}

body.dec-v4-pedago #edunum-result-count{
  margin:0 !important;
  color:var(--dec-navy) !important;
  font-size:14px !important;
  font-weight:750;
  opacity:1 !important;
}

.dec-reset-filters{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:38px;
  padding:0 10px;
  border:0;
  background:transparent;
  color:var(--dec-navy);
  font:700 13px/1 inherit;
  cursor:pointer;
}

.dec-reset-filters::after{
  content:"↻";
  font-size:21px;
  font-weight:400;
  line-height:1;
}

.dec-reset-filters:hover{
  color:var(--dec-green);
}

/* ---------- CARTES DE RESSOURCES ---------- */
body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
  --dec-resource-base:#d8e6f5;
  --dec-resource-accent:color-mix(in srgb,var(--dec-resource-base) 55%,var(--dec-navy));
  margin:0 0 9px !important;
  overflow:hidden !important;
  border:1px solid color-mix(in srgb,var(--dec-resource-base) 45%,#d9e1ec) !important;
  border-radius:13px !important;
  background:#fff !important;
  box-shadow:0 2px 8px rgba(21,39,75,.025) !important;
  transform:none !important;
}

body.dec-v4-pedago .dec-resource-card:hover{
  border-color:color-mix(in srgb,var(--dec-resource-base) 62%,#c6d0dd) !important;
  box-shadow:0 7px 18px rgba(21,39,75,.05) !important;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_head{
  display:grid !important;
  grid-template-columns:92px minmax(260px,1fr) auto 48px;
  gap:0 !important;
  min-height:88px !important;
  padding:0 !important;
  border:0 !important;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb,var(--dec-resource-base) 13%,white) 0%,
      color-mix(in srgb,var(--dec-resource-base) 7%,white) 100%
    ) !important;
  box-shadow:none !important;
}

.dec-resource-icon{
  display:grid;
  width:100%;
  height:100%;
  min-height:88px;
  place-items:center;
  border-right:1px solid color-mix(in srgb,var(--dec-resource-base) 35%,#e1e7ef);
  background:color-mix(in srgb,var(--dec-resource-base) 15%,white);
  color:var(--dec-resource-accent);
  pointer-events:none;
}

.dec-resource-icon svg{
  width:39px;
  height:39px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_heading{
  display:flex !important;
  min-width:0;
  align-items:center;
  padding:13px 22px !important;
}

body.dec-v4-pedago .dec-resource-card .head_content_wrapper,
body.dec-v4-pedago .dec-resource-card .title_wrapper{
  width:100%;
  min-width:0;
}

.dec-resource-type-label{
  display:table;
  margin:0 0 6px;
  padding:4px 9px 3px;
  border-radius:7px;
  background:color-mix(in srgb,var(--dec-resource-base) 27%,white);
  color:var(--dec-resource-accent);
  font-size:11px;
  font-weight:850;
  line-height:1.1;
  letter-spacing:.025em;
  text-transform:uppercase;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_title{
  margin:0 !important;
  color:var(--dec-navy) !important;
  font-size:16px !important;
  font-weight:780 !important;
  line-height:1.34 !important;
  letter-spacing:-.01em;
}

body.dec-v4-pedago .dec-resource-card .edunum-meta{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin:0 !important;
  padding:0 12px 0 6px;
}

body.dec-v4-pedago .dec-resource-card .edunum-badge,
body.dec-v4-pedago .dec-resource-card .edunum-action{
  min-height:37px !important;
  padding:0 14px !important;
  border:1px solid #d7dfe9 !important;
  border-radius:8px !important;
  background:rgba(255,255,255,.90) !important;
  color:var(--dec-navy) !important;
  font-size:12.5px !important;
  font-weight:750 !important;
  line-height:35px !important;
  white-space:nowrap;
  box-shadow:0 1px 3px rgba(21,39,75,.025) !important;
  transform:none !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-cat-short{
  width:auto !important;
  min-width:48px !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-badge.notice{
  min-width:37px !important;
  padding:0 9px !important;
  border-color:#efd170 !important;
  background:#fff4c8 !important;
  color:#8a6100 !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  border-color:#9fadc0 !important;
  background:#fff !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-action.dec-direct::after,
body.dec-v4-pedago .dec-resource-card .edunum-action.dec-qr::after{
  content:"";
  display:inline-block;
  width:15px;
  height:15px;
  margin-left:9px;
  vertical-align:-2px;
  background:currentColor;
}

body.dec-v4-pedago .dec-resource-card .edunum-action.dec-direct::after{
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.6 13.4a4 4 0 0 0 5.7 0l2.7-2.7a4 4 0 0 0-5.7-5.7l-1.5 1.5M13.4 10.6a4 4 0 0 0-5.7 0L5 13.3A4 4 0 0 0 10.7 19l1.5-1.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.6 13.4a4 4 0 0 0 5.7 0l2.7-2.7a4 4 0 0 0-5.7-5.7l-1.5 1.5M13.4 10.6a4 4 0 0 0-5.7 0L5 13.3A4 4 0 0 0 10.7 19l1.5-1.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

body.dec-v4-pedago .dec-resource-card .edunum-action.dec-qr::after{
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='6' height='6'/%3E%3Crect x='15' y='3' width='6' height='6'/%3E%3Crect x='3' y='15' width='6' height='6'/%3E%3Cpath d='M15 15h3v3h3v3h-6zM18 12v3M12 18h3M12 12h3'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='6' height='6'/%3E%3Crect x='15' y='3' width='6' height='6'/%3E%3Crect x='3' y='15' width='6' height='6'/%3E%3Cpath d='M15 15h3v3h3v3h-6zM18 12v3M12 18h3M12 12h3'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

/* Chevron : AAB conserve toute sa logique d'ouverture. */
body.dec-v4-pedago .dec-resource-card .aab__accordion_icon{
  position:relative;
  display:grid !important;
  width:48px !important;
  height:100%;
  min-height:88px;
  place-items:center;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_icon .aab__icon{
  display:none !important;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_icon::before{
  content:"";
  width:10px;
  height:10px;
  border-right:2px solid var(--dec-navy);
  border-bottom:2px solid var(--dec-navy);
  transform:rotate(45deg) translate(-2px,-2px);
  transition:transform .18s ease;
}

body.dec-v4-pedago .dec-resource-card[aria-expanded="true"] .aab__accordion_icon::before{
  transform:rotate(225deg) translate(-2px,-2px);
}

/* Corps ouvert : la V3.4 continue de gérer le contenu pédagogique. */
body.dec-v4-pedago .dec-resource-card .aab__accordion_body{
  border-top:1px solid color-mix(in srgb,var(--dec-resource-base) 35%,#e0e6ee) !important;
}

/* ---------- TABLETTE ---------- */
@media(max-width:1120px){
  .dec-pedago-hero{
    grid-template-columns:1fr;
    gap:20px;
    margin-top:20px;
  }

  .dec-pedago-welcome{
    max-width:700px;
  }

  body.dec-v4-pedago #edunum-filters{
    grid-template-columns:1fr 1fr !important;
  }

  body.dec-v4-pedago .edunum-filter-group{
    padding:5px 22px !important;
  }

  body.dec-v4-pedago .edunum-filter-group:nth-child(2){
    border-left:1px solid #e2e7ef;
  }

  body.dec-v4-pedago .edunum-filter-group:nth-child(3){
    grid-column:1/-1;
    margin-top:13px;
    padding:16px 0 2px !important;
    border-top:1px solid #e2e7ef;
    border-left:0 !important;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_head{
    grid-template-columns:72px minmax(220px,1fr) 42px;
  }

  .dec-resource-icon{
    min-height:78px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_heading{
    padding:12px 17px !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-meta{
    grid-column:2/4;
    grid-row:2;
    flex-wrap:wrap !important;
    justify-content:flex-start !important;
    padding:0 14px 13px 17px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_icon{
    grid-column:3;
    grid-row:1;
    width:42px !important;
    min-height:78px;
  }
}

/* ---------- MOBILE ---------- */
@media(max-width:700px){
  .dec-pedago-hero{
    margin:16px 0 24px;
  }

  .dec-pedago-hero h1{
    font-size:clamp(34px,11vw,44px);
  }

  .dec-pedago-subtitle{
    margin-top:9px;
    font-size:15px;
  }

  .dec-pedago-accent{
    width:72px;
    height:3px;
    margin-top:15px;
  }

  .dec-pedago-welcome{
    grid-template-columns:34px 1fr;
    gap:12px;
    padding:16px;
    border-radius:12px;
  }

  .dec-pedago-welcome-icon{
    width:32px;
    height:32px;
    font-size:17px;
  }

  body.dec-v4-pedago #edunum-toolbar{
    padding:13px !important;
    border-radius:13px !important;
  }

  body.dec-v4-pedago #edunum-search{
    height:48px !important;
    margin-bottom:14px !important;
    padding-left:48px !important;
    background-position:15px center !important;
  }

  body.dec-v4-pedago #edunum-filters{
    display:block !important;
  }

  body.dec-v4-pedago .edunum-filter-group,
  body.dec-v4-pedago .edunum-filter-group:first-child,
  body.dec-v4-pedago .edunum-filter-group:nth-child(2),
  body.dec-v4-pedago .edunum-filter-group:nth-child(3){
    margin:0 !important;
    padding:14px 0 !important;
    border:0 !important;
    border-top:1px solid #e5eaf1 !important;
  }

  body.dec-v4-pedago .edunum-filter-group:first-child{
    border-top:0 !important;
    padding-top:3px !important;
  }

  .dec-results-bar{
    align-items:flex-start;
    padding-top:10px;
  }

  .dec-reset-filters{
    flex:0 0 auto;
    font-size:0;
  }

  .dec-reset-filters::before{
    content:"Filtres";
    font-size:12px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_head{
    grid-template-columns:58px minmax(0,1fr) 38px;
  }

  .dec-resource-icon{
    min-height:72px;
  }

  .dec-resource-icon svg{
    width:31px;
    height:31px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_heading{
    padding:11px 12px !important;
  }

  .dec-resource-type-label{
    margin-bottom:5px;
    padding:3px 7px;
    font-size:10px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_title{
    font-size:14.5px !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-meta{
    grid-column:1/4;
    padding:0 10px 11px 58px;
    gap:6px !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-badge,
  body.dec-v4-pedago .dec-resource-card .edunum-action{
    min-height:34px !important;
    padding:0 10px !important;
    font-size:11.5px !important;
    line-height:32px !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-action.dec-direct::after,
  body.dec-v4-pedago .dec-resource-card .edunum-action.dec-qr::after{
    width:13px;
    height:13px;
    margin-left:6px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_icon{
    width:38px !important;
    min-height:72px;
  }
}


/* ==========================================================
   DÉCODAGE V4.1 — ALIGNEMENTS DU HERO
   Correction visuelle uniquement.
   ========================================================== */

/* Le hero suit exactement la largeur éditoriale des filtres/cartes. */
body.dec-v4-pedago .dec-pedago-hero{
  width:min(1240px,calc(100% - 48px));
  margin:24px auto 32px !important;
  grid-template-columns:minmax(0,1fr) minmax(300px,360px);
  gap:38px;
}

body.dec-v4-pedago .dec-pedago-hero h1{
  font-size:clamp(36px,3.55vw,50px);
}

body.dec-v4-pedago .dec-pedago-subtitle{
  font-size:16px;
}

/* Le panneau principal reste centré sur la même grille. */
body.dec-v4-pedago #edunum-toolbar,
body.dec-v4-pedago .dec-results-bar,
body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
  width:min(1240px,calc(100% - 48px));
  margin-left:auto !important;
  margin-right:auto !important;
}

body.dec-v4-pedago .dec-results-bar{
  padding-left:2px;
  padding-right:2px;
}

/* 7–8 : les remarques doivent venir après le hero, mais restent
   dans leur ordre Gutenberg et conservent leur contenu. */
body.dec-cycle-78.dec-v4-pedago .dec-pedago-hero + p,
body.dec-cycle-78.dec-v4-pedago .dec-pedago-hero + p + p{
  width:min(1120px,calc(100% - 48px));
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Sur tablette/mobile, conserver la même logique d'alignement. */
@media(max-width:1120px){
  body.dec-v4-pedago .dec-pedago-hero,
  body.dec-v4-pedago #edunum-toolbar,
  body.dec-v4-pedago .dec-results-bar,
  body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
    width:calc(100% - 36px);
  }

  body.dec-v4-pedago .dec-pedago-hero{
    grid-template-columns:1fr;
    gap:18px;
  }
}

@media(max-width:700px){
  body.dec-v4-pedago .dec-pedago-hero,
  body.dec-v4-pedago #edunum-toolbar,
  body.dec-v4-pedago .dec-results-bar,
  body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card,
  body.dec-cycle-78.dec-v4-pedago .dec-pedago-hero + p,
  body.dec-cycle-78.dec-v4-pedago .dec-pedago-hero + p + p{
    width:calc(100% - 24px);
  }

  body.dec-v4-pedago .dec-pedago-hero h1{
    font-size:clamp(32px,10vw,42px);
  }
}


/* ==========================================================
   DÉCODAGE V4.2 — CORRECTIONS
   - Contact : titre rétabli
   - cartouche pédagogique : formulation corrigée
   ========================================================== */

body.dec-page-contact .dec-contact-title{
  position:relative;
  margin:22px 0 25px !important;
  padding:0 0 18px !important;
  color:var(--dec-navy) !important;
  font-size:clamp(36px,3.4vw,48px) !important;
  font-weight:800 !important;
  line-height:1.04 !important;
  letter-spacing:-.04em;
}

body.dec-page-contact .dec-contact-title::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:82px;
  height:4px;
  border-radius:999px;
  background:var(--dec-green);
}

body.dec-page-contact .dec-contact-title + p{
  margin-top:0 !important;
}

@media(max-width:700px){
  body.dec-page-contact .dec-contact-title{
    margin-top:16px !important;
    margin-bottom:20px !important;
    font-size:34px !important;
  }
}


/* ==========================================================
   DÉCODAGE V4.3 — ETIQUETTES AU-DESSUS DU TITRE
   - badge de type sur sa propre ligne au-dessus du titre
   - suppression du doublon de type dans les badges de droite
   ========================================================== */
body.dec-v4-pedago .dec-resource-card .title_wrapper{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
}

.dec-resource-type-label{
  display:inline-flex !important;
  align-items:center;
  align-self:flex-start;
  margin:0 0 8px !important;
}

body.dec-v4-pedago .dec-resource-card .aab__accordion_title{
  display:block !important;
}

@media(max-width:700px){
  .dec-resource-type-label{
    margin-bottom:6px !important;
  }
}


/* ==========================================================
   DÉCODAGE V4.5 — LOGO DGEO TRANSPARENT
   ========================================================== */
.decodage-footer-logo-svg{
  display:block;
  width:auto;
  max-width:235px;
  max-height:62px;
  object-fit:contain;
}

@media(max-width:1150px){
  .decodage-footer-logo-svg{
    margin:0 auto;
  }
}

@media(max-width:700px){
  .decodage-footer-logo-svg{
    max-width:215px;
    max-height:58px;
  }
}


/* ==========================================================
   DÉCODAGE V4.6 — SIMPLIFICATION DES CARTES
   - suppression de l’étiquette de type au-dessus du titre
   - badges de droite légèrement raffinés dans l’esprit maquette
   - point d’avertissement forcé si le contenu source est vide
   ========================================================== */

/* Sécurité : même si une ancienne version du JS a injecté l'étiquette,
   on la masque désormais. */
.dec-resource-type-label{display:none !important;}

body.dec-v4-pedago .dec-resource-card .edunum-meta{
  gap:9px !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-badge,
body.dec-v4-pedago .dec-resource-card .edunum-action{
  border-radius:10px !important;
  background:rgba(255,255,255,.94) !important;
  box-shadow:0 2px 10px rgba(21,39,75,.04) !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-cat-short,
body.dec-v4-pedago .dec-resource-card .edunum-levels{
  min-width:42px !important;
  text-align:center !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-badge.notice{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:38px !important;
  padding:0 8px !important;
  font-size:16px !important;
  font-weight:900 !important;
  line-height:1 !important;
}


/* ==========================================================
   DÉCODAGE V4.7 — ACTIONS COLORÉES + GÉNÉRALITÉS
   - Généralités revient à droite uniquement pour ce type
   - badges/actions reprennent la palette de la ligne
   - Lien direct + Code QR regroupés verticalement sur desktop
   ========================================================== */

body.dec-v4-pedago .dec-resource-card .edunum-meta{
  gap:8px !important;
}

/* Badges de métadonnées : fond très léger de la couleur de la ligne,
   bordure et texte plus soutenus. */
body.dec-v4-pedago .dec-resource-card .edunum-badge:not(.notice){
  border-color:color-mix(in srgb,var(--dec-resource-base) 48%,#cbd5e2) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 14%,white) !important;
  color:var(--dec-resource-accent) !important;
  box-shadow:0 2px 8px rgba(21,39,75,.035) !important;
}

/* Actions : un peu plus présentes, dans la même logique graphique. */
body.dec-v4-pedago .dec-resource-card .edunum-action{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  min-height:32px !important;
  padding:0 11px !important;
  border-color:color-mix(in srgb,var(--dec-resource-base) 58%,#c3cedd) !important;
  border-radius:9px !important;
  background:color-mix(in srgb,var(--dec-resource-base) 20%,white) !important;
  color:var(--dec-resource-accent) !important;
  line-height:1 !important;
  box-shadow:0 2px 8px rgba(21,39,75,.035) !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  border-color:var(--dec-resource-accent) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 29%,white) !important;
  color:var(--dec-resource-accent) !important;
}

/* Colonne compacte des deux actions. */
.dec-actions-stack{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap:5px;
  margin-left:2px;
}

.dec-actions-stack .edunum-action{
  width:122px !important;
  min-width:122px !important;
}

body.dec-v4-pedago .dec-resource-card .dec-actions-stack .edunum-action.dec-direct::after,
body.dec-v4-pedago .dec-resource-card .dec-actions-stack .edunum-action.dec-qr::after{
  flex:0 0 auto;
  margin-left:auto !important;
}

/* Le warning garde volontairement son jaune distinct. */
body.dec-v4-pedago .dec-resource-card .edunum-badge.notice{
  border-color:#e8c758 !important;
  background:#fff2b9 !important;
  color:#8b6200 !important;
  box-shadow:0 2px 8px rgba(139,98,0,.06) !important;
}

@media(max-width:1120px){
  .dec-actions-stack{
    flex-direction:row;
    flex-wrap:wrap;
    gap:6px;
  }

  .dec-actions-stack .edunum-action{
    width:auto !important;
    min-width:112px !important;
  }
}

@media(max-width:700px){
  .dec-actions-stack{
    width:100%;
    flex-direction:row;
    flex-wrap:nowrap;
  }

  .dec-actions-stack .edunum-action{
    flex:1 1 50%;
    min-width:0 !important;
    width:auto !important;
  }
}


/* ==========================================================
   DÉCODAGE V4.8 — ACTIONS SEULES COLORÉES
   Niveaux / axes / Généralités redeviennent neutres.
   Seuls Lien direct et Code QR reprennent la couleur de la ligne.
   ========================================================== */

/* Métadonnées : retour au blanc, hiérarchie discrète. */
body.dec-v4-pedago .dec-resource-card .edunum-badge:not(.notice){
  border-color:#d6dee9 !important;
  background:#fff !important;
  color:var(--dec-navy) !important;
  box-shadow:0 1px 4px rgba(21,39,75,.025) !important;
}

/* Actions : conserver la teinte graphique de la ligne. */
body.dec-v4-pedago .dec-resource-card .edunum-action{
  border-color:color-mix(in srgb,var(--dec-resource-base) 60%,#c3cedd) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 20%,white) !important;
  color:var(--dec-resource-accent) !important;
  box-shadow:0 2px 8px rgba(21,39,75,.035) !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  border-color:var(--dec-resource-accent) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 30%,white) !important;
  color:var(--dec-resource-accent) !important;
}

/* Le warning reste volontairement distinct. */
body.dec-v4-pedago .dec-resource-card .edunum-badge.notice{
  border-color:#e8c758 !important;
  background:#fff2b9 !important;
  color:#8b6200 !important;
}


/* ==========================================================
   DÉCODAGE V4.9 — INFOBULLES VALIDÉES
   Deux aides uniquement : axes PER et types de ressource.
   ========================================================== */

body.dec-v4-pedago .edunum-filter-title::after{
  display:none !important;
}

.dec-filter-help{
  position:relative;
  display:inline-flex;
  align-items:center;
}

.dec-filter-help-button{
  display:grid;
  width:18px;
  height:18px;
  flex:0 0 18px;
  place-items:center;
  margin:0;
  padding:0;
  border:1px solid #8492a8;
  border-radius:50%;
  background:#fff;
  color:#617089;
  font:700 11px/1 Georgia,serif;
  cursor:help;
}

.dec-filter-help-button:hover,
.dec-filter-help-button:focus-visible,
.dec-filter-help.is-open .dec-filter-help-button{
  border-color:var(--dec-navy);
  color:var(--dec-navy);
  outline:none;
  box-shadow:0 0 0 3px rgba(13,35,84,.06);
}

.dec-filter-tooltip{
  position:absolute;
  z-index:3000;
  top:calc(100% + 10px);
  left:50%;
  width:min(390px,calc(100vw - 36px));
  padding:14px 16px;
  border:1px solid #d5deea;
  border-radius:10px;
  background:#fff;
  color:#3c4961;
  font-size:12.5px;
  font-weight:500;
  line-height:1.5;
  box-shadow:0 12px 30px rgba(21,39,75,.14);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,-3px);
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
}

.dec-filter-tooltip strong{
  color:var(--dec-navy);
  font-weight:800;
}

.dec-filter-tooltip + .dec-filter-tooltip{
  margin-top:0;
}

.dec-filter-tooltip::before{
  content:"";
  position:absolute;
  top:-6px;
  left:50%;
  width:10px;
  height:10px;
  border-top:1px solid #d5deea;
  border-left:1px solid #d5deea;
  background:#fff;
  transform:translateX(-50%) rotate(45deg);
}

.dec-filter-help:hover .dec-filter-tooltip,
.dec-filter-help:focus-within .dec-filter-tooltip,
.dec-filter-help.is-open .dec-filter-tooltip{
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0);
  pointer-events:auto;
}

@media(max-width:700px){
  .dec-filter-tooltip{
    position:fixed;
    top:auto;
    right:14px;
    bottom:18px;
    left:14px;
    width:auto;
    transform:translateY(6px);
    font-size:13px;
  }

  .dec-filter-tooltip::before{
    display:none;
  }

  .dec-filter-help:hover .dec-filter-tooltip,
  .dec-filter-help:focus-within .dec-filter-tooltip,
  .dec-filter-help.is-open .dec-filter-tooltip{
    transform:translateY(0);
  }
}


/* ==========================================================
   DÉCODAGE V4.10 — COULEURS LÉGÈREMENT RENFORCÉES
   Un seul cran au-dessus de la V4.9 : plus présent, sans devenir vif.
   ========================================================== */

/* Fond des lignes : un peu plus de teinte. */
body.dec-v4-pedago .dec-resource-card .aab__accordion_head{
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb,var(--dec-resource-base) 18%,white) 0%,
      color-mix(in srgb,var(--dec-resource-base) 11%,white) 100%
    ) !important;
}

/* Bordure de la carte légèrement plus lisible. */
body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
  border-color:color-mix(in srgb,var(--dec-resource-base) 56%,#d6dee8) !important;
}

/* Zone pictogramme un peu plus assumée. */
.dec-resource-icon{
  border-right-color:color-mix(in srgb,var(--dec-resource-base) 47%,#dde4ed) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 23%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 88%,var(--dec-navy)) !important;
}

/* Actions : même principe, juste un peu plus présentes. */
body.dec-v4-pedago .dec-resource-card .edunum-action{
  border-color:color-mix(in srgb,var(--dec-resource-base) 72%,#bdc9d8) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 28%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 92%,var(--dec-navy)) !important;
}

body.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  border-color:var(--dec-resource-accent) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 38%,white) !important;
}

/* Les badges informatifs restent blancs pour conserver la hiérarchie. */
body.dec-v4-pedago .dec-resource-card .edunum-badge:not(.notice){
  background:#fff !important;
}

/* L'accent du cycle dans le hero gagne juste un soupçon de présence. */
.dec-pedago-accent{
  opacity:1 !important;
  filter:saturate(1.08);
}


/* ==========================================================
   DÉCODAGE V4.12 — ANTI-FLASH
   Empêche l'affichage fugitif de l'ancienne mise en page avant
   l'installation de la couche graphique pédagogique.
   ========================================================== */

/* La classe dec-v4-loading est posée dans <head> avant le premier rendu.
   On masque uniquement la zone pédagogique, jamais le header du site. */
html.dec-v4-loading body.dec-v4-pedago .entry-content,
html.dec-v4-loading body.dec-v4-pedago h1.entry-title,
html.dec-v4-loading body.dec-v4-pedago .nv-page-title-wrap,
html.dec-v4-loading body.dec-v4-pedago .nv-big-title{
  visibility:hidden !important;
}

/* Réserve une hauteur minimale pendant les quelques millisecondes
   de préparation afin d'éviter un saut brutal du footer. */
html.dec-v4-loading body.dec-v4-pedago .single-page-container{
  min-height:620px;
}

/* Apparition très brève et douce de la version finale. */
html.dec-v4-ready body.dec-v4-pedago .entry-content{
  animation:dec-v4-reveal .09s ease-out both;
}

@keyframes dec-v4-reveal{
  from{opacity:.01;}
  to{opacity:1;}
}

@media(max-width:700px){
  html.dec-v4-loading body.dec-v4-pedago .single-page-container{
    min-height:480px;
  }
}


/* ==========================================================
   DÉCODAGE V4.13 — CODES COULEURS DANS LE MENU
   Même palette que les années/couvertures.
   ========================================================== */

/* Les pages génériques restent en bleu nuit. */
.decodage-primary-nav a{
  --dec-menu-accent:var(--dec-green);
}

/* Couleur propre à chaque groupe d'années.
   Sélecteurs par URL : fonctionne avec le menu de secours comme
   avec un menu WordPress personnalisé. */
.decodage-primary-nav a[href$="/1-2/"]{
  --dec-menu-accent:var(--dec-12);
  color:var(--dec-12);
}

.decodage-primary-nav a[href$="/3-4/"]{
  --dec-menu-accent:var(--dec-34);
  color:var(--dec-34);
}

.decodage-primary-nav a[href$="/5-6/"]{
  --dec-menu-accent:var(--dec-56);
  color:var(--dec-56);
}

.decodage-primary-nav a[href$="/7-8/"]{
  --dec-menu-accent:var(--dec-78);
  color:color-mix(in srgb,var(--dec-78) 78%,#456b36);
}

/* Le trait actif/survol reprend la couleur de l'année. */
.decodage-primary-nav a::after{
  background:var(--dec-menu-accent) !important;
}

/* Ne pas écraser la couleur propre des niveaux quand l'item est actif. */
.decodage-primary-nav .current-menu-item > a[href$="/1-2/"],
.decodage-primary-nav .current_page_item > a[href$="/1-2/"],
.decodage-primary-nav a[href$="/1-2/"][aria-current="page"]{
  color:var(--dec-12);
}

.decodage-primary-nav .current-menu-item > a[href$="/3-4/"],
.decodage-primary-nav .current_page_item > a[href$="/3-4/"],
.decodage-primary-nav a[href$="/3-4/"][aria-current="page"]{
  color:var(--dec-34);
}

.decodage-primary-nav .current-menu-item > a[href$="/5-6/"],
.decodage-primary-nav .current_page_item > a[href$="/5-6/"],
.decodage-primary-nav a[href$="/5-6/"][aria-current="page"]{
  color:var(--dec-56);
}

.decodage-primary-nav .current-menu-item > a[href$="/7-8/"],
.decodage-primary-nav .current_page_item > a[href$="/7-8/"],
.decodage-primary-nav a[href$="/7-8/"][aria-current="page"]{
  color:color-mix(in srgb,var(--dec-78) 78%,#456b36);
}

/* Mobile : reprendre les mêmes couleurs dans le panneau menu. */
.decodage-mobile-panel a[href$="/1-2/"]{color:var(--dec-12);}
.decodage-mobile-panel a[href$="/3-4/"]{color:var(--dec-34);}
.decodage-mobile-panel a[href$="/5-6/"]{color:var(--dec-56);}
.decodage-mobile-panel a[href$="/7-8/"]{
  color:color-mix(in srgb,var(--dec-78) 78%,#456b36);
}

@supports not (color:color-mix(in srgb,red,white)){
  .decodage-primary-nav a[href$="/7-8/"],
  .decodage-mobile-panel a[href$="/7-8/"]{
    color:#72a75a;
  }
}


/* ==========================================================
   DÉCODAGE V4.14 — ACCENTS FONCÉS 1-2 ET 5-6
   Même logique de palette, mais 1-2 et 5-6 sont un peu plus appuyés.
   3-4 et 7-8 restent inchangés.
   ========================================================== */

/* 1-2 : violet foncé un peu plus présent */
body.dec-cycle-12.dec-v4-pedago .dec-resource-card .aab__accordion_head{
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb,var(--dec-resource-base) 24%,white) 0%,
      color-mix(in srgb,var(--dec-resource-base) 16%,white) 100%
    ) !important;
}

body.dec-cycle-12.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
  border-color:color-mix(in srgb,var(--dec-resource-base) 66%,#d3d9e4) !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-icon{
  border-right-color:color-mix(in srgb,var(--dec-resource-base) 58%,#d9e0ea) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 30%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 96%,var(--dec-navy)) !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-card .edunum-action{
  border-color:color-mix(in srgb,var(--dec-resource-base) 80%,#b9c3d2) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 36%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 98%,var(--dec-navy)) !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  background:color-mix(in srgb,var(--dec-resource-base) 44%,white) !important;
}

/* 5-6 : vert foncé un peu plus présent */
body.dec-cycle-56.dec-v4-pedago .dec-resource-card .aab__accordion_head{
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb,var(--dec-resource-base) 24%,white) 0%,
      color-mix(in srgb,var(--dec-resource-base) 16%,white) 100%
    ) !important;
}

body.dec-cycle-56.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
  border-color:color-mix(in srgb,var(--dec-resource-base) 66%,#d3d9e4) !important;
}

body.dec-cycle-56.dec-v4-pedago .dec-resource-icon{
  border-right-color:color-mix(in srgb,var(--dec-resource-base) 58%,#d9e0ea) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 30%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 96%,var(--dec-navy)) !important;
}

body.dec-cycle-56.dec-v4-pedago .dec-resource-card .edunum-action{
  border-color:color-mix(in srgb,var(--dec-resource-base) 80%,#b9c3d2) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 36%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 98%,var(--dec-navy)) !important;
}

body.dec-cycle-56.dec-v4-pedago .dec-resource-card .edunum-action:hover{
  background:color-mix(in srgb,var(--dec-resource-base) 44%,white) !important;
}


/* ==========================================================
   DÉCODAGE V4.15 — MOBILE COMPACT
   - filtres repliés par défaut sur mobile (recherche visible)
   - bouton "Filtres" dédié dans la barre des résultats
   - cartes ressources resserrées pour limiter l'espace perdu
   ========================================================== */

.dec-results-controls{
  display:flex;
  align-items:center;
  gap:8px;
}

.dec-toggle-filters{
  display:none;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 12px;
  border:1px solid #d6dee9;
  border-radius:10px;
  background:#fff;
  color:var(--dec-navy);
  font:700 13px/1 inherit;
  cursor:pointer;
  box-shadow:0 1px 4px rgba(21,39,75,.03);
}

.dec-toggle-filters::after{
  content:"▾";
  margin-left:7px;
  font-size:14px;
  line-height:1;
}

.dec-toggle-filters[aria-expanded="true"]::after{
  content:"▴";
}

@media(max-width:700px){
  .dec-results-bar{
    align-items:center;
    gap:10px;
    padding-top:8px;
  }

  .dec-results-count-wrap{
    min-width:0;
    flex:1 1 auto;
  }

  .dec-results-controls{
    flex:0 0 auto;
  }

  .dec-toggle-filters{
    display:inline-flex;
  }

  /* Sur mobile, le pseudo-libellé "Filtres" de l'ancien bouton
     de réinitialisation n'est plus utile : on restaure son vrai texte. */
  .dec-reset-filters{
    font-size:12px;
    min-height:36px;
    padding:0 10px;
  }

  .dec-reset-filters::before{
    content:none !important;
  }

  body.dec-v4-pedago #edunum-toolbar{
    padding:11px !important;
    border-radius:14px !important;
  }

  body.dec-v4-pedago #edunum-search{
    height:44px !important;
    margin-bottom:12px !important;
    padding-left:44px !important;
    background-position:14px center !important;
    font-size:15px !important;
  }

  /* Repli mobile : seule la recherche reste visible par défaut. */
  body.dec-v4-pedago #edunum-toolbar.is-collapsed .edunum-filter-group{
    display:none !important;
  }

  body.dec-v4-pedago #edunum-toolbar.is-collapsed #edunum-search{
    margin-bottom:0 !important;
  }

  body.dec-v4-pedago #edunum-toolbar.is-collapsed{
    padding-bottom:11px !important;
  }

  /* Cartes plus compactes */
  body.dec-v4-pedago .wp-block-aab-accordion-block.edunum-item.dec-resource-card{
    margin-bottom:12px !important;
    border-radius:18px !important;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_head{
    grid-template-columns:48px minmax(0,1fr) 34px;
  }

  .dec-resource-icon{
    min-height:62px;
  }

  .dec-resource-icon svg{
    width:28px;
    height:28px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_heading{
    padding:10px 10px 6px !important;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_title{
    font-size:13.5px !important;
    line-height:1.28 !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-meta{
    grid-column:1/4;
    padding:0 10px 10px 48px;
    gap:7px !important;
  }

  body.dec-v4-pedago .dec-resource-card .edunum-badge,
  body.dec-v4-pedago .dec-resource-card .edunum-action{
    min-height:32px !important;
    padding:0 10px !important;
    border-radius:11px !important;
    font-size:11.25px !important;
    line-height:30px !important;
  }

  .dec-actions-stack{
    width:100%;
    gap:8px;
    margin-left:0;
  }

  .dec-actions-stack .edunum-action{
    flex:1 1 50%;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_icon{
    width:34px !important;
    min-height:62px;
  }

  body.dec-v4-pedago .dec-resource-card .aab__accordion_icon::before{
    width:11px;
    height:11px;
  }

  /* Bouton retour haut un peu moins intrusif */
  .dec-scroll-top{
    right:12px !important;
    bottom:12px !important;
  }
}


/* ==========================================================
   DÉCODAGE V4.16 — AJUSTEMENTS MENU + SCÉNARIOS 1-2
   - menu : texte noir par défaut, couleur seulement sur item actif / hover
   - 1-2 : scénarios tirent davantage vers le bleu que vers le violet
   ========================================================== */

/* MENU DESKTOP : noir par défaut */
.decodage-primary-nav a{
  color:var(--dec-navy) !important;
}

/* On garde un accent propre à chaque rubrique pour le trait */
.decodage-primary-nav a[href$="/1-2/"]{ --dec-menu-accent:var(--dec-12); }
.decodage-primary-nav a[href$="/3-4/"]{ --dec-menu-accent:var(--dec-34); }
.decodage-primary-nav a[href$="/5-6/"]{ --dec-menu-accent:var(--dec-56); }
.decodage-primary-nav a[href$="/7-8/"]{ --dec-menu-accent:color-mix(in srgb,var(--dec-78) 78%,#456b36); }
.decodage-primary-nav a[href$="/contact/"]{ --dec-menu-accent:var(--dec-green); }
.decodage-primary-nav a[href$="/accueil/"]{ --dec-menu-accent:var(--dec-green); }

/* Couleur du texte seulement quand l'item est actif ou survolé */
.decodage-primary-nav a:hover,
.decodage-primary-nav a:focus-visible{
  color:var(--dec-menu-accent, var(--dec-green)) !important;
}

.decodage-primary-nav .current-menu-item > a,
.decodage-primary-nav .current_page_item > a,
.decodage-primary-nav a[aria-current="page"]{
  color:var(--dec-menu-accent, var(--dec-green)) !important;
}

/* MOBILE PANEL : garder le texte noir hors item actif */
.decodage-mobile-panel a{
  color:var(--dec-navy) !important;
}

.decodage-mobile-panel a:hover,
.decodage-mobile-panel a:focus-visible,
.decodage-mobile-panel .current-menu-item > a,
.decodage-mobile-panel .current_page_item > a,
.decodage-mobile-panel a[aria-current="page"]{
  color:var(--dec-menu-accent, var(--dec-green)) !important;
}

/* 1-2 : les scénarios basculent un peu plus vers un bleu lavande */
body.dec-cycle-12.dec-v4-pedago .dec-resource-card[data-type="scenario"]{
  --dec-resource-base:#d7e3fb !important;
  --dec-resource-accent:#5e76be !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-card[data-type="scenario"] .aab__accordion_head{
  background:linear-gradient(
    90deg,
    color-mix(in srgb,var(--dec-resource-base) 22%,white) 0%,
    color-mix(in srgb,var(--dec-resource-base) 12%,white) 100%
  ) !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-card[data-type="scenario"] .dec-resource-icon{
  background:color-mix(in srgb,var(--dec-resource-base) 24%,white) !important;
  border-right-color:color-mix(in srgb,var(--dec-resource-base) 50%,#d9e0ea) !important;
}

body.dec-cycle-12.dec-v4-pedago .dec-resource-card[data-type="scenario"] .edunum-action.dec-direct,
body.dec-cycle-12.dec-v4-pedago .dec-resource-card[data-type="scenario"] .edunum-action.dec-qr{
  border-color:color-mix(in srgb,var(--dec-resource-base) 78%,#b9c3d2) !important;
  background:color-mix(in srgb,var(--dec-resource-base) 28%,white) !important;
  color:color-mix(in srgb,var(--dec-resource-accent) 94%,var(--dec-navy)) !important;
}


/* ==========================================================
   DÉCODAGE V4.17 — IDENTITÉ PAR ANNÉE
   - violets 1-2 / 3-4 mieux différenciés
   - chevrons du logo selon l'année
   - DÉ coloré dans les titres de pages
   ========================================================== */

/* Couleur d'identité lisible pour les éléments de texte. */
body.dec-cycle-12{ --dec-cycle-ink:var(--dec-12); }
body.dec-cycle-34{ --dec-cycle-ink:#8879b4; }
body.dec-cycle-56{ --dec-cycle-ink:var(--dec-56); }
body.dec-cycle-78{ --dec-cycle-ink:#72a95b; }
body:not(.dec-cycle-12):not(.dec-cycle-34):not(.dec-cycle-56):not(.dec-cycle-78){
  --dec-cycle-ink:var(--dec-green);
}

/* Logo du header : seuls < et > changent selon l'année. */
.decodage-brand .decodage-mark{
  color:var(--dec-cycle-ink, var(--dec-green)) !important;
}

/* Titre éditorial : DÉ en majuscules coloré, reste en bleu nuit. */
.dec-pedago-title-prefix{
  color:var(--dec-cycle-ink, var(--dec-green));
  font-weight:inherit;
}

/* Le petit trait du hero suit la même identité. */
body.dec-v4-pedago .dec-pedago-accent{
  background:var(--dec-cycle-ink, var(--dec-cycle)) !important;
}


/* ==========================================================
   DÉCODAGE V4.18 — TITRES ÉDITORIAUX SOBRES
   Le logo conserve son identité ; les titres de page reviennent
   à une typographie éditoriale normale.
   ========================================================== */

.dec-pedago-title-prefix{
  color:inherit !important;
  font-weight:inherit !important;
}


/* ==========================================================
   DÉCODAGE V4.19 — HEADER SANS RECHERCHE GLOBALE
   ========================================================== */

.decodage-header-inner{
  grid-template-columns:auto 1fr !important;
}

.decodage-primary-nav{
  justify-self:end;
}

.decodage-mobile-panel ul{
  margin-bottom:0 !important;
}


/* ==========================================================
   DÉCODAGE V4.20 — NIVEAU DANS LE LOGO
   Le niveau est porté par la marque dans le header.
   Le grand titre de page est retiré visuellement, mais conservé
   comme H1 accessible pour la structure du document.
   ========================================================== */

.decodage-brand-level{
  display:inline-block;
  margin-left:9px;
  color:var(--dec-cycle-ink, var(--dec-green));
  font-size:.58em;
  font-weight:800;
  letter-spacing:-.02em;
  vertical-align:.13em;
}

/* H1 sémantique : présent pour les lecteurs d'écran, invisible visuellement. */
.dec-pedago-semantic-title{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  margin:-1px !important;
  padding:0 !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  clip-path:inset(50%) !important;
  border:0 !important;
  white-space:nowrap !important;
}

/* Sans grand titre visuel, resserrer le bandeau de page. */
body.dec-v4-pedago .dec-pedago-hero{
  margin-top:18px !important;
  margin-bottom:24px !important;
  align-items:center;
}

body.dec-v4-pedago .dec-pedago-hero-main{
  padding-top:0;
}

body.dec-v4-pedago .dec-pedago-subtitle{
  margin-top:0 !important;
}

body.dec-v4-pedago .dec-pedago-accent{
  margin-top:13px;
}

@media(max-width:700px){
  .decodage-brand-level{
    margin-left:7px;
    font-size:.56em;
  }

  body.dec-v4-pedago .dec-pedago-hero{
    margin-top:12px !important;
    margin-bottom:18px !important;
    gap:13px;
  }

  body.dec-v4-pedago .dec-pedago-accent{
    margin-top:10px;
  }
}


/* ==========================================================
   DÉCODAGE V4.21 — EN-TÊTE PÉDAGOGIQUE COMPACT
   - niveau du logo à la même taille que CODAGE
   - suppression de l'ancien effet "hero"
   - introduction + Version en ligne sur une ligne desktop
   - filtres remontés
   ========================================================== */

/* Le niveau fait désormais pleinement partie de l'intitulé du logo. */
.decodage-brand-level{
  margin-left:10px !important;
  font-size:1em !important;
  line-height:1 !important;
  letter-spacing:-.045em !important;
  vertical-align:baseline !important;
}

/* Le conteneur garde son rôle structurel, mais n'a plus l'allure d'un hero. */
body.dec-v4-pedago .dec-pedago-hero{
  width:min(1240px,calc(100% - 48px));
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,360px) !important;
  gap:28px !important;
  align-items:center !important;
  margin:14px auto 16px !important;
}

body.dec-v4-pedago .dec-pedago-hero-main{
  padding:0 !important;
}

body.dec-v4-pedago .dec-pedago-subtitle{
  max-width:none !important;
  margin:0 !important;
  color:#4c5870;
  font-size:15px !important;
  line-height:1.45 !important;
}

/* Le trait d'accent n'est plus nécessaire sans titre visuel. */
body.dec-v4-pedago .dec-pedago-accent{
  display:none !important;
}

/* Version en ligne : plus petite et plus horizontale. */
body.dec-v4-pedago .dec-pedago-welcome{
  grid-template-columns:34px minmax(0,1fr) !important;
  gap:11px !important;
  align-items:center !important;
  padding:12px 14px !important;
  border-radius:13px !important;
  box-shadow:0 4px 16px rgba(21,39,75,.035) !important;
}

body.dec-v4-pedago .dec-pedago-welcome-icon{
  width:32px !important;
  height:32px !important;
  font-size:17px !important;
  border-width:1.5px !important;
}

body.dec-v4-pedago .dec-pedago-welcome strong{
  margin:0 0 2px !important;
  font-size:14px !important;
  line-height:1.2 !important;
}

body.dec-v4-pedago .dec-pedago-welcome span{
  font-size:12.5px !important;
  line-height:1.4 !important;
}

/* Rapprocher les filtres de l'introduction. */
body.dec-v4-pedago #edunum-toolbar{
  margin-top:0 !important;
}

/* Tablette : l'introduction et le cartouche peuvent encore tenir côte à côte
   assez longtemps avant de passer sur deux lignes. */
@media(max-width:900px){
  body.dec-v4-pedago .dec-pedago-hero{
    grid-template-columns:1fr !important;
    gap:10px !important;
    margin-top:12px !important;
    margin-bottom:12px !important;
  }

  body.dec-v4-pedago .dec-pedago-welcome{
    max-width:none !important;
  }
}

/* Mobile : compact, mais lisible. */
@media(max-width:700px){
  .decodage-brand-level{
    margin-left:7px !important;
    font-size:1em !important;
  }

  body.dec-v4-pedago .dec-pedago-hero{
    width:calc(100% - 24px) !important;
    margin-top:10px !important;
    margin-bottom:10px !important;
    gap:9px !important;
  }

  body.dec-v4-pedago .dec-pedago-subtitle{
    font-size:13.5px !important;
    line-height:1.4 !important;
  }

  body.dec-v4-pedago .dec-pedago-welcome{
    grid-template-columns:29px minmax(0,1fr) !important;
    gap:9px !important;
    padding:10px 11px !important;
  }

  body.dec-v4-pedago .dec-pedago-welcome-icon{
    width:28px !important;
    height:28px !important;
    font-size:15px !important;
  }

  body.dec-v4-pedago .dec-pedago-welcome strong{
    font-size:13px !important;
  }

  body.dec-v4-pedago .dec-pedago-welcome span{
    font-size:11.75px !important;
    line-height:1.35 !important;
  }
}


/* ==========================================================
   DÉCODAGE V4.22 — ACCUEIL ÉPURÉ
   - aucun header du thème sur la page d'accueil uniquement
   - les pages pédagogiques conservent intégralement leur header
   ========================================================== */

body.home .neve-main,
body.home .decodage-site-wrapper{
  padding-top:0 !important;
  margin-top:0 !important;
}
