@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --j-cyan: #15bcd6;
  --j-cyan-light: #7fd4ef;
  --j-blue: #1b6fb2;
  --j-blue-dark: #124e80;
  --j-purple: #8e3fb0;
  --j-purple-light: #b15fd0;
  --j-grad: linear-gradient(90deg, #15bcd6 0%, #8ad7ef 100%);
  --j-grad-underline: linear-gradient(90deg, #8e3fb0 0%, #15bcd6 100%);
  --j-ink: #15233a;
  --j-text: #34404a;
  --j-muted: #6b7280;
  --j-line: #e6e8ec;
  --j-maxw: 1200px;
  --j-head: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --j-body: 'PT Serif', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body,
.pkp_structure_page {
  font-family: var(--j-body) !important;
  color: var(--j-text);
  background: #ffffff;
  line-height: 1.65;
}
a { color: var(--j-blue); text-decoration: none; }
a:hover { color: var(--j-blue-dark); }
h1, h2, h3, h4, h5 { font-family: var(--j-head); }

.j_topbar { background: #10324f; }
.j_topbar_in {
  max-width: var(--j-maxw); margin: 0 auto; padding: 8px 24px;
  display: flex; justify-content: flex-end; align-items: center; gap: 18px;
}
.j_topbar a { color: #ffffff; font-family: var(--j-head); font-size: 14px; font-weight: 500; }
.j_topbar a:hover { color: #eaf8fd; }

.pkp_structure_head {
  background: #ffffff !important; border-bottom: 1px solid var(--j-line);
  padding: 0 !important; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.pkp_head_wrapper { max-width: var(--j-maxw); margin: 0 auto; padding: 0 !important; }
.pkp_site_name_wrapper {
  display: flex; align-items: center; gap: 28px;
  padding: 8px 24px !important; min-height: 0 !important;
  height: auto !important; /* annule la hauteur fixe (2.857rem) du thème parent sur mobile */
}
.j_logo img { height: 92px; width: auto; display: block; }

.j_nav { display: flex; flex: 1; justify-content: center; align-items: center; gap: 10px; }
.j_nav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--j-ink); font-family: var(--j-head); font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 4px;
}
.j_nav a .fa { color: var(--j-blue); }
.j_nav a:hover, .j_nav a.active { color: var(--j-blue); background: #f1f8fc; }

.j_search { margin-left: auto; display: flex; align-items: stretch; }
.j_search input {
  border: 1px solid #d7dbe0; border-right: 0; border-radius: 4px 0 0 4px;
  padding: 9px 13px; width: 230px; font-family: var(--j-head); font-size: 14px;
}
.j_search button {
  border: 1px solid #cfd4da; background: #e9ebee; color: #444; cursor: pointer;
  padding: 0 16px; border-radius: 0 4px 4px 0; font-family: var(--j-head); font-size: 14px;
}
.j_search button:hover { background: #dfe2e6; }

.pkp_structure_content {
  max-width: var(--j-maxw); margin: 0 auto; padding: 8px 24px 40px; background: transparent;
}

.j_hero { margin: 18px 0 6px; border-radius: 8px; overflow: hidden; }
.j_hero_banner { width: 100%; height: auto; display: block; }

.j_section_bar {
  background: #10324f; color: #ffffff;
  font-family: var(--j-head); font-weight: 700; font-size: 18px;
  padding: 8px 16px; border-radius: 3px; margin: 20px 0 16px;
}

.j_layout { display: grid; grid-template-columns: 1fr 340px; gap: 36px; align-items: start; }

.j_desc { display: grid; grid-template-columns: 1fr 1.15fr; gap: 30px; align-items: start; }
.j_desc_media img { width: 100%; border-radius: 4px; }
.j_desc_logo { width: 70%; margin: 0 auto 14px; display: block; }
.j_slideshow { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 1748 / 2480; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.j_ss_slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.j_ss_slide.is-active { opacity: 1; }
.j_ss_dots { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; z-index: 2; }
.j_ss_dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); margin: 0 4px; padding: 0; cursor: pointer; }
.j_ss_dots button.is-active { background: #fff; }
@media (prefers-reduced-motion: reduce) { .j_ss_slide { transition: opacity .2s ease; } }
.j_desc p { text-align: justify; margin: 0 0 14px; }

.current_issue_title, .j_issue_id { font-family: var(--j-head); font-weight: 700; font-size: 18px; color: var(--j-ink); margin: 0 0 10px; }
.obj_article_summary { border-bottom: 1px solid var(--j-line); padding: 18px 0; }
.obj_article_summary .title a { font-family: var(--j-head); color: var(--j-ink) !important; font-size: 17px; font-weight: 600; }
.obj_article_summary .title a:hover { color: var(--j-blue) !important; }
.obj_article_summary .authors, .obj_article_summary .meta { color: var(--j-muted); font-size: 14px; }
.obj_article_summary .galleys_links { margin-top: 10px; padding: 0; list-style: none; }
.obj_article_summary .galleys_links li { display: inline-block; margin: 6px 8px 0 0; }
.obj_article_summary .galleys_links a {
  display: inline-block; background: var(--j-blue); color: #fff !important;
  font-family: var(--j-head); font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 4px;
}
.obj_article_summary .galleys_links a:hover { background: var(--j-blue-dark); }
.j_read_more { display: inline-block; margin-top: 18px; font-family: var(--j-head); font-weight: 600; color: var(--j-blue); }

.j_side_box {
  border: 1px solid var(--j-line); border-radius: 8px; padding: 16px; margin-bottom: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.j_submit {
  display: flex; align-items: center; gap: 16px;
}
.j_submit .fa { font-size: 30px; color: var(--j-blue); }
.j_submit .txt { font-family: var(--j-head); font-weight: 700; font-size: 22px; color: var(--j-ink); line-height: 1.05; }

.j_menu { border: 1px solid var(--j-line); border-radius: 8px; overflow: hidden; margin-bottom: 22px; }
.j_menu a {
  display: flex; align-items: center; gap: 12px; position: relative;
  padding: 13px 16px; color: var(--j-purple); font-family: var(--j-head); font-weight: 600; font-size: 14px;
  border-left: 3px solid var(--j-purple);
}
.j_menu a .fa { color: var(--j-purple); width: 20px; text-align: center; font-size: 15px; }
.j_menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--j-grad-underline); background-size: 200% 100%;
  transition: height .2s ease;
}
.j_menu a:last-child::after { display: none; }
.j_menu a { transition: padding .15s ease, background .15s ease, color .15s ease; }
.j_menu a:hover {
  background: #f6f0fb; padding-left: 22px;
  color: var(--j-blue); text-decoration: underline;
}
.j_menu a:hover .fa { color: var(--j-blue); }
.j_menu a:hover::after {
  height: 4px;
  background: linear-gradient(270deg, #1b6fb2, #2db4e8, #8e3fb0, #2db4e8, #1b6fb2);
  background-size: 200% 100%;
  animation: jUnderline 1.6s linear infinite;
}
@keyframes jUnderline { from { background-position: 0 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .j_menu a:hover::after { animation: none; } }

.j_board { border: 1px solid var(--j-line); border-radius: 8px; overflow: hidden; }
.j_board_head { background: #10324f; color: #ffffff; font-family: var(--j-head); font-weight: 700; font-size: 14px; padding: 11px 15px; }
.j_editor { display: flex; gap: 12px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--j-line); }
.j_editor:last-child { border-bottom: 0; }
.j_editor img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; border: 1px solid #eee; flex: none; }
.j_editor .name { font-family: var(--j-head); color: #666; font-size: 14px; }
.j_editor .role { font-family: var(--j-head); font-weight: 700; color: #444; font-size: 14px; }
.j_editor .aff { color: var(--j-muted); font-size: 13px; }
.j_flagcounter { padding: 14px; text-align: center; }
.j_flagcounter img { max-width: 100%; height: auto; }

.pkp_structure_footer_wrapper { background: #10324f !important; color: #cfe0ee; margin-top: 36px; border-top: 4px solid; border-image: var(--j-grad) 1; }
.pkp_structure_footer { max-width: var(--j-maxw); margin: 0 auto; padding: 40px 24px 12px; }
.j_footer_grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 38px; }
.j_footer_col h4 { color: #fff; font-size: 17px; font-weight: 700; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid rgba(255,255,255,.2); }
.j_footer_col ul { list-style: none; margin: 0; padding: 0; }
.j_footer_col li { margin-bottom: 8px; }
.j_footer_col a { color: #cfe0ee !important; font-size: 14px; }
.j_footer_col a:hover { color: #fff !important; }
.j_footer_col p { font-size: 14px; margin: 0 0 8px; }
.j_footer_bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 18px; padding: 14px 0; text-align: center; font-size: 13px; color: #9fb8cd; }
.pkp_brand_footer { display: none; }

.pkp_site_nav_toggle { display: none; }
.pkp_structure_content { width: auto !important; max-width: var(--j-maxw) !important; margin: 0 auto !important; }
.pkp_structure_main,
.pkp_structure_main:first-child:last-child {
  width: 100% !important; max-width: 100% !important; float: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important;
}
.pkp_structure_main:before, .pkp_structure_main:after { display: none !important; }

@keyframes j4In { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pkp_structure_main { animation: j4In .45s ease both; }
@view-transition { navigation: auto; }

/* ---------- Responsive ---------- */

img { max-width: 100%; height: auto; }

/* Tablette et moins : le menu devient un bouton hamburger */
@media (max-width: 1024px) {
  /* Le header doit rester au-dessus du contenu pour que le menu déplié le recouvre */
  .pkp_structure_head { position: relative; z-index: 200; overflow: visible; }

  .pkp_site_name_wrapper { flex-wrap: wrap; gap: 14px; }
  .j_logo { order: 1; }

  /* On annule le positionnement absolu imposé par le thème parent d'OJS */
  .pkp_site_nav_toggle {
    position: static; z-index: auto; box-shadow: none;
    display: inline-flex; align-items: center; justify-content: center;
    order: 2; margin-left: auto;
    width: 44px; height: 40px; padding: 0;
    border: 1px solid var(--j-line); border-radius: 4px;
    background: #ffffff; cursor: pointer;
  }
  .pkp_site_nav_toggle:focus { outline: 2px solid var(--j-blue); box-shadow: none; }
  .pkp_site_nav_toggle span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap;
    border: 0; background: none;
  }
  .pkp_site_nav_toggle::before { content: "\2630"; font-size: 20px; line-height: 1; color: var(--j-ink); }
  .pkp_site_nav_toggle.is-open::before { content: "\2715"; }

  .j_search { order: 3; margin-left: 0; width: 100%; }
  .j_search input { width: 100%; }

  /* Le menu devient un panneau qui se superpose au contenu (jamais derrière) */
  .j_nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #ffffff; border-top: 1px solid var(--j-line);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .2);
    padding: 4px 16px 10px; margin: 0;
  }
  .j_nav.open { display: flex; }
  .j_nav a { padding: 14px 10px; border-bottom: 1px solid var(--j-line); border-radius: 0; }
  .j_nav a:last-child { border-bottom: 0; }
}

/* La barre latérale passe sous le contenu principal */
@media (max-width: 980px) {
  .j_layout { grid-template-columns: 1fr; }
  .j_footer_grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

/* La photo passe au-dessus du texte de description */
@media (max-width: 760px) {
  .j_desc { grid-template-columns: 1fr; }
}

/* Téléphone : tailles et marges réduites */
@media (max-width: 640px) {
  .j_logo img { height: 64px; }
  .j_topbar_in { padding: 8px 16px; }
  .pkp_structure_content { padding: 8px 16px 32px; }
  .j_section_bar { font-size: 16px; }
  .j_submit .txt { font-size: 19px; }
  .j_footer_grid { grid-template-columns: 1fr; }
  .pkp_structure_footer { padding: 28px 16px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pkp_structure_main { animation: none; }
}
