/* Jaum Classe — charte orange sur fond clair */

/* --- Masquer header/footer du thème --- */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part { display: none !important; }

/* --- Fond général clair --- */
body { background: #f6f8fb; color: #1f2933; }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > .wp-block-group { padding: 0 !important; }
.wp-site-blocks a { color: #e8712a; }

/* =========================================================================
   HEADER
   ========================================================================= */
.jaum-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e7e7ee;
  box-shadow: 0 1px 0 rgba(232,113,42,.35);
}
.jaum-brand { display: flex; align-items: center; gap: 13px; }
.jaum-logo {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(232,113,42,.4);
}
.jaum-brand-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.1; color: #1f2933; }
.jaum-brand-text em { color: #e8712a; font-style: normal; }
.jaum-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.jaum-nav-link {
  color: #1f2933; text-decoration: none;
  padding: 9px 18px; border-radius: 999px;
  font-size: .92rem; font-weight: 600;
  transition: background .16s ease, color .16s ease;
}
.jaum-nav-link:hover { background: #e8712a; color: #fff; }
.jaum-nav .current-menu-item > a,
.jaum-nav a[aria-current="page"] { background: #e8712a; color: #fff; }

/* =========================================================================
   HERO
   ========================================================================= */
.jaum-hero {
  position: relative;
  margin: 0 calc(-50vw + 50%);
  background: linear-gradient(135deg, #e8712a 0%, #f59e0b 100%);
  padding: clamp(56px, 10vw, 110px) clamp(16px, 5vw, 56px);
  text-align: center;
  overflow: hidden;
}
.jaum-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.22), transparent 55%),
              radial-gradient(circle at 10% 90%, rgba(255,255,255,.12), transparent 45%);
  pointer-events: none;
}
.jaum-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none; opacity: .5;
}
.jaum-hero-sm { padding: clamp(40px, 7vw, 72px) clamp(16px, 5vw, 56px); }
.jaum-hero-inner { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.jaum-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 14px; letter-spacing: -0.03em; color: #fff; }
.jaum-hero h1 span { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.15); }
.jaum-hero p { color: #fff; opacity: .95; font-size: 1.15rem; margin: 0; max-width: 640px; margin-inline: auto; }

/* =========================================================================
   CONTENU
   ========================================================================= */
.jaum-content {
  max-width: 1200px; margin: 0 auto;
  padding: 48px clamp(16px, 5vw, 40px);
}
.jaum-section { margin-bottom: 56px; }
.jaum-section-title {
  font-size: 1.55rem; margin: 0 0 26px;
  display: flex; align-items: center; gap: 12px;
  color: #1f2933;
}
.jaum-section-title::before {
  content: ""; width: 5px; height: 26px; border-radius: 3px;
  background: linear-gradient(180deg, #e8712a, #f59e0b);
  flex: none;
}

.jaum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.jaum-grid-rubriques { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.jaum-grid-portail { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* --- Carte ressource --- */
.jaum-card {
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
}
.jaum-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(15,23,42,.12); border-color: rgba(232,113,42,.5); }
.jaum-card-media { position: relative; }
.jaum-card-media img { width: 100%; height: 170px; object-fit: cover; display: block; }
.jaum-card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20,20,20,.5));
}
.jaum-card-body { padding: 22px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.jaum-card-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.jaum-chip { font-size: .72rem; padding: 4px 11px; border-radius: 999px; font-weight: 700; }
.jaum-card-title { font-size: 1.12rem; margin: 0; line-height: 1.35; }
.jaum-card-title a { color: #1f2933; text-decoration: none; }
.jaum-card-title a:hover { color: #e8712a; }
.jaum-card-theme { font-size: .84rem; color: #64748b; }
.jaum-card-excerpt { font-size: .9rem; color: #475569; flex: 1; line-height: 1.55; }
.jaum-card-actions { display: flex; gap: 10px; margin-top: 8px; }

/* --- Boutons --- */
.jaum-btn {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, #e8712a 0%, #f59e0b 100%);
  color: #fff !important;
  padding: 10px 22px; border-radius: 999px;
  text-decoration: none !important; font-weight: 700; font-size: .9rem;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 18px rgba(232,113,42,.3);
}
.jaum-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232,113,42,.4); }
.jaum-btn-ghost { background: transparent; border: 1px solid #e8712a; color: #e8712a !important; box-shadow: none; }
.jaum-btn-ghost:hover { background: rgba(232,113,42,.1); box-shadow: none; }
.jaum-btn-disabled { background: #e7e7ee; color: #64748b !important; opacity: .6; cursor: not-allowed; box-shadow: none; }

/* --- Tuile rubrique --- */
.jaum-rubrique-tile {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid #e7e7ee;
  border-left: 4px solid var(--jaum-accent, #e8712a);
  border-radius: 12px;
  padding: 20px 22px;
  color: #1f2933 !important;
  text-decoration: none !important; font-weight: 700;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
}
.jaum-rubrique-tile:hover { transform: translateX(4px); background: #fff; border-color: var(--jaum-accent, #e8712a); }

/* --- Tuile portail --- */
.jaum-portail-tile {
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  transition: transform .15s ease, border-color .15s ease;
  box-shadow: 0 1px 4px rgba(15,23,42,.05);
}
.jaum-portail-tile:hover { transform: translateY(-4px); border-color: rgba(232,113,42,.45); }
.jaum-portail-icon { font-size: 2.3rem; line-height: 1; }
.jaum-portail-name { font-weight: 800; font-size: 1.06rem; color: #1f2933; }
.jaum-portail-desc { font-size: .8rem; color: #64748b; line-height: 1.4; }

.jaum-empty { color: #64748b; font-style: italic; }
.jaum-hiboutik { background: #fff; border: 1px solid #e7e7ee; border-radius: 16px; padding: 30px; }

/* --- Séquences / dossiers --- */
.jaum-sequence {
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 16px;
  padding: 22px 22px 26px;
  margin-bottom: 28px;
  box-shadow: 0 1px 4px rgba(15,23,42,.04);
}
.jaum-sequence-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.22rem; margin: 0 0 18px; color: #1f2933;
}
.jaum-folder { color: #e8712a; }
.jaum-tile-count {
  margin-left: auto;
  background: rgba(232,113,42,.15);
  color: #e8712a;
  font-style: normal; font-weight: 800; font-size: .78rem;
  min-width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.jaum-footer {
  margin: 0 calc(-50vw + 50%);
  background: #1f2933;
  border-top: 2px solid #e8712a;
  padding: 48px clamp(16px, 5vw, 56px) 24px;
}
.jaum-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px;
}
.jaum-footer-brand .jaum-logo { width: 50px; height: 50px; margin-bottom: 12px; }
.jaum-footer-title { font-weight: 800; font-size: 1.08rem; margin-bottom: 6px; color: #fff; }
.jaum-footer-brand p { color: rgba(255,255,255,.65); font-size: .87rem; margin: 0; }
.jaum-footer-col { display: flex; flex-direction: column; gap: 9px; }
.jaum-footer-heading { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: #f59e0b; margin-bottom: 6px; }
.jaum-footer-col a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .9rem; transition: color .15s ease, opacity .15s ease; }
.jaum-footer-col a:hover { color: #f59e0b; opacity: 1; }
.jaum-footer-bottom { max-width: 1200px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: .8rem; color: rgba(255,255,255,.45); }

/* --- PDF embed sur page ressource --- */
.jaum-pdf-wrap { margin-top: 22px; }
.jaum-pdf-wrap .pdfemb-viewer { border-radius: 12px; overflow: hidden; background: #fff; }
.jaum-pdf-download { margin-top: 14px; text-align: center; }

/* --- Liste navigateur de fichiers (rubriques) --- */
.jaum-list { display: flex; flex-direction: column; gap: 8px; }
.jaum-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1px solid #e7e7ee;
  border-radius: 12px;
  padding: 13px 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.jaum-row:hover { border-color: rgba(232,113,42,.5); box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.jaum-row-num {
  font-weight: 700;
  font-size: 0.95rem;
  color: #64748b;
  min-width: 24px;
  flex: none;
}
.jaum-row-icon { font-size: 1.35rem; flex: none; }
.jaum-row-name { flex: 1; color: #1f2933; text-decoration: none; font-weight: 600; }
.jaum-row-name:hover { color: #e8712a; }
.jaum-row-date {
  flex: none;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}
.jaum-row-dl {
  flex: none;
  background: rgba(232,113,42,.1);
  color: #e8712a;
  text-decoration: none;
  font-weight: 700; font-size: .82rem;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.jaum-row-dl:hover { background: #e8712a; color: #fff; }

/* --- Page ressource : pleine largeur d'écran --- */
body.single-ressource main .wp-block-group,
body.single-ressource .wp-block-post-content,
body.single-ressource .entry-content { max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
body.single-ressource .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.single-ressource .jaum-pdf-wrap,
body.single-ressource .jaum-pdf-wrap .pdfemb-viewer,
body.single-ressource .pdfemb-viewer .pdfemb-inner-div { width: 100% !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
body.single-ressource .hb-doc { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; }
body.single-ressource .jaum-pdf-download { text-align: center !important; }

/* --- Masquer l'image mise en avant sous le titre des articles --- */
body.single-ressource .wp-block-post-featured-image,
body.single-ressource figure.wp-block-post-featured-image,
body.single-ressource .wp-post-image { display: none !important; }

@media (max-width: 720px) {
  .jaum-footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .jaum-topbar { justify-content: center; text-align: center; padding: 12px 16px; }
  .jaum-nav { justify-content: center; }
  .jaum-grid, .jaum-grid-rubriques, .jaum-grid-portail { grid-template-columns: 1fr; }
}

/* Lien Espace Prof — teinte discrète, bordure orange au survol */
.jaum-nav-link.jaum-nav-prof,
.jaum-nav-link[href*="suivi-prof"] {
  background: rgba(31, 31, 31, 0.06);
  border: 1px solid rgba(245, 130, 32, 0.35);
  font-weight: 600;
}
.jaum-nav-link.jaum-nav-prof:hover,
.jaum-nav-link[href*="suivi-prof"]:hover {
  background: var(--jaum-orange, #F58220);
  border-color: var(--jaum-orange, #F58220);
  color: #fff;
}
