/* ═══════════════════════════════════════════════════════════
   style.css – mkadmi.tn – Modern Professional Theme 2025
   Palette : bordeaux • gold • white • light grey
   Font    : Verdana (inherited from edifrance.css + modernised)
═══════════════════════════════════════════════════════════ */

:root {
  --bord:     #6B1A2A;
  --bord-mid: #8B2635;
  --bord-lt:  #A83248;
  --gold:     #C8860A;
  --gold-lt:  #E8A820;
  --white:    #FFFFFF;
  --bg:       #FAFAFA;
  --bg-strip: #F5EEEF;
  --text:     #1E1A1B;
  --muted:    #7A6065;
  --line:     #DDD0D3;
  --link:     #bf0417;   /* edifrance original */
  --nav-h:    80px;
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 9pt;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--link); text-decoration: underline; font-weight: bold; }
a:hover { color: var(--bord-mid); }
p { text-align: justify; margin-bottom: .55em; }

/* ── Page wrapper ─────────────────────────────────────── */
.site-wrap {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(107,26,42,.09);
}

/* ═══════════════════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════════════════ */
.topbar {
  background: var(--bord);
  border-bottom: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}
/*.topbar-logo .logo-initials {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13pt; font-weight: bold; color: var(--bord);
  flex-shrink: 0;
}
.topbar-logo .logo-text {
  color: var(--white);
  font-size: 10.5pt;
  font-weight: bold;
  line-height: 1.2;
}
.topbar-logo .logo-text span {
  display: block;
  font-size: 7.5pt;
  font-weight: normal;
  color: #E0C0C8;
}*/
.topbar-logo .logo-svg {
  height: 62px;
  width: auto;
  display: block;
}
.topnav { display: flex; gap: 2px; align-items: center; }
.topnav a {
  color: #F0DDE0;
  text-decoration: none;
  font-size: 8pt;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 3px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.topnav a:hover,
.topnav a.active {
  background: var(--gold);
  color: var(--bord);
}
/* Hamburger (mobile) */
.nav-toggle { display: none; cursor: pointer; background: none; border: none; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white); margin: 5px 0;
  transition: .3s;
}

/* ═══════════════════════════════════════════════════════
   PAGE HEADER (banner under topbar – page-specific)
═══════════════════════════════════════════════════════ */
.page-banner {
  background: linear-gradient(135deg, var(--bord) 60%, var(--bord-mid) 100%);
  border-bottom: 3px solid var(--gold);
  padding: 18px 28px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-banner h1 {
  color: var(--white);
  font-size: 14pt;
  font-weight: bold;
  margin: 0;
}
.page-banner .banner-icon {
  font-size: 22pt;
  flex-shrink: 0;
}
.page-banner .banner-sub {
  color: #E8C8D0;
  font-size: 8.5pt;
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════ */
.page-body { padding: 0 28px 40px; }

/* ── Section heading ──────────────────────────────────── */
.sec-head {
  background: var(--bord);
  color: var(--white);
  font-size: 10.5pt;
  font-weight: bold;
  padding: 6px 14px;
  margin: 26px -28px 14px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  letter-spacing: .3px;
}
.sub-head {
  color: var(--bord-mid);
  font-size: 9.5pt;
  font-weight: bold;
  border-bottom: 2px solid var(--bord-mid);
  padding-bottom: 3px;
  margin: 16px 0 8px;
}

/* ── Bullet list ──────────────────────────────────────── */
.cv-list { list-style: none; padding: 0; margin: 6px 0 12px; }
.cv-list li {
  padding: 3px 0 3px 18px;
  position: relative;
  font-size: 9pt;
  line-height: 1.5;
  text-align: justify;
}
.cv-list li::before {
  content: "▸";
  color: var(--bord-lt);
  position: absolute; left: 0; top: 3px;
  font-size: 8pt;
}

/* ── Entry row (date | content) ───────────────────────── */
.entry { display: flex; gap: 16px; margin-bottom: 10px; }
.entry-date {
  flex: 0 0 110px;
  font-weight: bold; color: var(--bord-mid);
  font-size: 8.5pt; padding-top: 1px;
}
.entry-body { flex: 1; }
.entry-body strong { font-size: 9pt; }
.entry-body .inst { font-style: italic; color: var(--muted); font-size: 8.5pt; display: block; margin-top: 1px; }
.entry-body .det  { font-size: 8.5pt; display: block; margin-top: 2px; }

/* ── Tables ───────────────────────────────────────────── */
.cv-table {
  width: 100%; border-collapse: collapse;
  font-size: 8.5pt; margin-bottom: 14px;
}
.cv-table thead tr { background: var(--bord); color: var(--white); }
.cv-table thead th { padding: 5px 8px; text-align: left; font-weight: bold; }
.cv-table tbody tr:nth-child(even) { background: var(--bg-strip); }
.cv-table tbody td { padding: 4px 8px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.cv-table .num { text-align: center; width: 30px; color: var(--bord-mid); font-weight: bold; }
.cv-table .yr  { white-space: nowrap; color: var(--bord-mid); font-weight: bold; }

/* ── Info box ─────────────────────────────────────────── */
.info-box {
  background: var(--bg-strip);
  border-left: 4px solid var(--bord-mid);
  padding: 8px 12px;
  font-size: 8.5pt;
  margin-bottom: 14px;
  line-height: 1.5;
}
.info-box strong { color: var(--bord); }

/* ── Divider ──────────────────────────────────────────── */
hr.divider { border: none; border-top: 1px solid var(--line); margin: 8px 0; }

/* ═══════════════════════════════════════════════════════
   HOME PAGE – specific
═══════════════════════════════════════════════════════ */
.home-hero {
  background: linear-gradient(135deg, var(--bord) 55%, var(--bord-mid));
  border-bottom: 4px solid var(--gold);
  padding: 28px 28px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.hero-photo img {
  width: 155px; height: 178px;
  object-fit: cover; object-position: center top;
  border: 3px solid var(--gold);
  border-radius: 6px;
  display: block;
}
.hero-info { flex: 1; }
.hero-info h1 {
  font-size: 20pt; font-weight: bold; color: var(--white);
  margin: 0 0 5px;
}
.hero-info .hero-title {
  color: var(--gold-lt); font-size: 9.5pt; font-style: italic;
  margin-bottom: 10px;
}
.hero-info .hero-contact { font-size: 8.5pt; color: #F0DCE0; line-height: 1.8; }
.hero-info .hero-contact a { color: #F0DCE0; font-weight: normal; }
.hero-info .hero-contact a:hover { color: var(--gold-lt); }

/* Academic profiles strip */
.profiles-strip {
  background: var(--bg-strip);
  border-bottom: 2px solid var(--line);
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 4px;
  padding: 8px 16px;
}
.profiles-strip a {
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 7.5pt; font-weight: bold; color: var(--bord);
  text-decoration: none;
  padding: 4px 12px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--white);
  transition: .15s;
}
.profiles-strip a .ps { font-size: 7pt; font-weight: normal; color: var(--muted); }
.profiles-strip a:hover { background: var(--bord); color: var(--white); border-color: var(--bord); }
.profiles-strip a:hover .ps { color: var(--gold-lt); }

/* Book cards grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin: 10px 0 14px;
}
.book-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--bord);
  border-radius: 4px;
  padding: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(107,26,42,.07);
  transition: box-shadow .2s;
}
.book-card:hover { box-shadow: 0 4px 16px rgba(107,26,42,.14); }
.book-card .book-title {
  font-weight: bold; font-size: 9pt; color: var(--bord);
  margin-bottom: 5px; line-height: 1.35;
}
.book-card .book-meta { font-size: 8pt; color: var(--muted); margin-bottom: 6px; }
.book-card .book-desc { font-size: 8pt; color: var(--text); text-align: justify; }
.book-card .book-link { display: inline-block; margin-top: 7px; font-size: 8pt; }

/* Conf cards */
.conf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.conf-card {
  background: var(--bord);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(107,26,42,.12);
}
.conf-card .conf-name { font-weight: bold; font-size: 9.5pt; color: var(--gold-lt); margin-bottom: 5px; }
.conf-card .conf-detail { font-size: 8pt; color: #E8D0D4; line-height: 1.45; }
.conf-card a { color: var(--gold-lt); font-weight: normal; }
.conf-card a:hover { color: var(--white); }

/* ═══════════════════════════════════════════════════════
   PUBLICATIONS PAGE – specific
═══════════════════════════════════════════════════════ */
.pub-item {
  padding: 5px 0 5px 20px;
  position: relative;
  font-size: 8pt;
  line-height: 1.5;
  border-bottom: 1px dotted var(--line);
  text-align: justify;
}

/* Badge Scopus */
.scopus-badge {
  display: inline-block;
  background-color: #e87722;
  color: #fff !important;
  font-size: 6.8pt;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: 0.03em;
  text-decoration: none !important;
  border: none;
}
.scopus-badge:hover {
  background-color: #c45f00 !important;
  color: #fff !important;
}
.pub-item::before {
  content: "▸";
  color: var(--bord-lt);
  position: absolute; left: 0; top: 5px;
  font-size: 8pt;
}
.pub-item .pub-num { font-weight: bold; color: var(--bord-mid); margin-right: 4px; }
.pub-item .pub-lang {
  display: inline-block;
  font-size: 7pt; font-weight: bold;
  background: var(--bord); color: var(--white);
  padding: 1px 5px; border-radius: 2px;
  margin-right: 4px; vertical-align: middle;
}
.pub-item .doi-link { font-size: 8pt; }
.pub-item em { color: var(--bord-mid); }

/* Pub filter tabs */
.pub-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 14px 0 6px;
}
.pub-tabs a {
  font-size: 8pt; font-weight: bold;
  color: var(--bord); text-decoration: none;
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--bord);
  background: var(--white);
  transition: .15s;
}
.pub-tabs a:hover,
.pub-tabs a.active { background: var(--bord); color: var(--white); }

/* ═══════════════════════════════════════════════════════
   RESEARCH PAGE – specific
═══════════════════════════════════════════════════════ */
.research-axis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.axis-card {
  background: var(--bg-strip);
  border-top: 3px solid var(--bord);
  border-radius: 4px;
  padding: 12px;
}
.axis-card .axis-icon { font-size: 18pt; margin-bottom: 6px; }
.axis-card .axis-title { font-weight: bold; color: var(--bord); font-size: 9pt; margin-bottom: 4px; }
.axis-card .axis-desc { font-size: 8pt; color: var(--muted); line-height: 1.4; }

.links-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}
.links-cols a {
  display: block;
  font-size: 8.5pt; padding: 4px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bord-lt);
  border-radius: 3px;
  text-decoration: none;
  color: var(--link);
  transition: .15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.links-cols a:hover {
  background: var(--bg-strip);
  border-left-color: var(--bord);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bord);
  border-top: 3px solid var(--gold);
  color: #C0A0A8;
  font-size: 8pt;
  text-align: center;
  padding: 14px 20px;
  line-height: 1.7;
}
.site-footer a { color: var(--gold-lt); font-weight: normal; }
.site-footer a:hover { color: var(--white); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */

  .site-wrap { box-shadow: none; }
  .sec-head { margin: 18px 0 10px; }
  .page-body { padding: 0; }
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE – MOBILE FIRST
═══════════════════════════════════════════════════════ */
@media (max-width: 680px) {

  /* ── Topbar ── */
  :root { --nav-h: 60px; }

  .topbar { position: relative; padding: 0 12px; }

  .topbar-logo .logo-svg,
  .logo-horizontal .logo-svg {
    height: 46px !important;
    width: auto !important;
  }

  .nav-toggle { display: block; }

  .topnav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bord);
    padding: 6px 0;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    border-top: 2px solid var(--gold);
  }
  .topnav.open { display: flex; }
  .topnav a {
    border-radius: 0;
    padding: 11px 20px;
    width: 100%;
    font-size: 9pt;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .lang-switch {
    top: 4px; right: 52px;
    font-size: 7pt;
    padding: 2px 8px;
  }

  /* ── Hero ── */
  .home-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 14px;
    gap: 12px;
  }
  .hero-photo img { width: 100px; height: 115px; }
  .hero-info h1 { font-size: 14pt; }
  .hero-info .hero-contact,
  .hero-contact { text-align: left; font-size: 7.5pt; }

  /* ── Layout sidebar → stacked ── */
  .page-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--line);
    min-height: auto;
    padding: 10px 14px;
  }
  /* Sidebar sections en ligne sur mobile */
  .sb-section { margin-bottom: 10px; }
  .sb-nav a { font-size: 8pt; padding: 4px 6px; }

  /* Profiles en ligne */
  .social-wrap { gap: 4px; }
  .social-wrap a { width: 26px; height: 26px; font-size: 10pt; }

  /* Affiliations compactes */
  .uni-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .uni-list a { border-bottom: none; padding-bottom: 0; width: calc(50% - 6px); }

  /* ── Main content ── */
  .main-content { padding: 12px 14px; }

  /* ── Conf grid 1 col ── */
  .conf-grid { grid-template-columns: 1fr; gap: 7px; }

  /* ── Books ── */
  .book-row { flex-direction: column; gap: 8px; }
  .book-cover { width: 100%; flex-direction: row; min-height: auto;
    padding: 6px 10px; gap: 10px; justify-content: flex-start; }
  .book-cover .cov-ico { margin-bottom: 0; font-size: 18pt; }

  /* ── CV tables scroll horizontal ── */
  .cv-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .entry { flex-direction: column; gap: 2px; }
  .entry-date { flex: none; }

  /* ── Page body padding ── */
  .page-body { padding: 0 14px 28px; }
  .sec-head { margin: 20px -14px 12px; }

  /* ── Grids → 1 col ── */
  .books-grid, .conf-grid, .research-axis, .links-cols {
    grid-template-columns: 1fr;
  }

  /* ── Pub tabs scroll ── */
  .pub-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pub-tabs a { flex-shrink: 0; }

  /* ── Footer ── */
  .site-footer { font-size: 7.5pt; padding: 10px 14px; }
  .site-footer div { margin-bottom: 4px; line-height: 1.9; }
}

@media (max-width: 400px) {
  .topbar-logo .logo-svg,
  .logo-horizontal .logo-svg { height: 38px !important; }
  .hero-info h1 { font-size: 12pt; }
  .uni-list a { width: 100%; }
}

@media print {
  .topbar, .site-footer { display: none; }
  .site-wrap { box-shadow: none; }
  .sec-head { margin: 18px 0 10px; }
  .page-body { padding: 0; }
}

/* ═══════════════════════════════════════════════════════
   LOGO dans la topbar
═══════════════════════════════════════════════════════ */
.topbar-logo .logo-svg {
  width: auto;
  height: 65px;
  max-height: 65px;
  flex-shrink: 0;
}
/* Version horizontale du logo (topbar) */
.logo-horizontal {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-horizontal img,
.logo-horizontal .logo-svg {
  width: auto;
  height: 65px;
}
.logo-horizontal .logo-text {
  color: var(--white);
  font-size: 10.5pt;
  font-weight: bold;
  line-height: 1.2;
  font-family: Verdana, sans-serif;
}
.logo-horizontal .logo-text span {
  display: block;
  font-size: 7.5pt;
  font-weight: normal;
  color: #E0C0C8;
}

/* Lien langue flottant */
.lang-switch {
  position: absolute;
  top: 0; right: 0;
  background: var(--gold);
  color: var(--bord) !important;
  font-size: 7.5pt;
  font-weight: bold !important;
  padding: 3px 10px;
  text-decoration: none !important;
  border-bottom-left-radius: 5px;
  transition: background .15s;
  z-index: 200;
}
.lang-switch:hover { background: var(--gold-lt) !important; color: var(--bord) !important; }
